import { type Image } from "https://deno.land/x/canvas@v1.4.2/src/types.ts";
See SkImage.h for more information on this class.
Methods
Encodes this image's pixels to the specified format and returns them. Must be built with the specified codec. If the options are unspecified, sensible defaults will be chosen.
Returns the color space associated with this object. It is the user's responsibility to call delete() on this after it has been used.
Returns the width, height, colorType and alphaType associated with this image. Colorspace is separate so as to not accidentally leak that memory.
Returns an Image with the same "base" pixels as the this image, but with mipmap levels automatically generated and attached.
Returns this image as a shader with the specified tiling. It will use cubic sampling.
Returns this image as a shader with the specified tiling. It will use cubic sampling.
Returns a TypedArray containing the pixels reading starting at (srcX, srcY) and does not exceed the size indicated by imageInfo. See SkImage.h for more on the caveats.
If dest is not provided, we allocate memory equal to the provided height * the provided bytesPerRow to fill the data with.