img-split
Split an
<img>
into equally-sized parts
install
npm install img-split
usage
const split = const load =
images = split(image, width, height)
Splits image
into individual <canvas>
elements of the dimensions described by width
and height
.
image
: TheHTMLImageElement
to be splitwidth
: The desired width of each resulting<canvas>
elementheight
: The desired height of each resulting<canvas>
element