img-extract

1.0.0 • Public • Published

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

/img-extract/

    Package Sidebar

    Install

    npm i img-extract

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.44 kB

    Total Files

    4

    Last publish

    Collaborators

    • semibran