MK_api.img
The img container class can be used to manipulate image files.
e.g., to re-encode video frames or composite A/B images.
Fills the container with the contents of the given image file.
Saves the container to the given image file.
The output format is selected by the filename extension.
Returns the width in pixels of the current image.
Returns the height in pixels of the current image.
Returns the channel count (1, 2, 3 or 4) of the current image.
Allocates an empty rgb8 canvas of the given dimensions.
Allocates an empty rgba8 canvas of the given dimensions.
Coerces the in-memory pixel format to plain rgb8.
Use this after load() before put_image() when the source file is
png16, tiff16, exr32f or any other non-rgb8 / rgba8 format.
Coerces the in-memory pixel format to plain rgba8.
Replaces the contents of this image with a copy of src.
Crops the image to the given rectangle.
Resamples the image to the given dimensions.
Pastes src into this image at the given top-left coordinate.
Fills the image with the given 8-bit color.