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.
Optionalfmt: EmbindEnumEntityPNG is the default value.
Optionalquality: numbera value from 0 to 100; 100 is the least lossy. May be ignored.
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.
Return the height in pixels of the image.
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.
tile mode in the x direction.
tile mode in the y direction.
See CubicResampler in SkSamplingOptions.h for more information
See CubicResampler in SkSamplingOptions.h for more information
OptionallocalMatrix: InputMatrixReturns this image as a shader with the specified tiling. It will use cubic sampling.
tile mode in the x direction.
tile mode in the y direction.
The filter mode.
The mipmap mode. Note: for settings other than None, the image must have mipmaps calculated with makeCopyWithDefaultMipmaps;
OptionallocalMatrix: InputMatrixReturns 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.
describes the destination format of the pixels.
Optionaldest: MallocObjIf provided, the pixels will be copied into the allocated buffer allowing access to the pixels without allocating a new TypedArray.
OptionalbytesPerRow: numbernumber of bytes per row. Must be provided if dest is set. This depends on destination ColorType. For example, it must be at least 4 * width for the 8888 color type.
a TypedArray appropriate for the specified ColorType. Note that 16 bit floats are not supported in JS, so that colorType corresponds to raw bytes Uint8Array.
Return the width in pixels of the image.
See SkImage.h for more information on this class.