Skip to content

semibran/img-extract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

img-extract

tiny subimage extractor

usage

npm badge

extract(image, x, y, width, height) -> canvas

Extracts a canvas from the provided image and x, y, width, height region.

  • image: The source image of type CanvasImageSource
  • x: The x-coordinate offset of the subimage in pixels
  • y: The y-coordinate offset of the subimage in pixels
  • width: The width of the subimage in pixels
  • height: The height of the subimage in pixels
  • canvas: The subimage, of type HTMLCanvasElement

Releases

No releases published

Packages

No packages published