public class ReadFile
Image input and output methods.
public static Pix readMem(kotlin.Array[] encodedData)
Creates a 32bpp Pix object from encoded data. Supported formats are BMP, JPEG, and PNG.
encodedData - BMP, JPEG, or PNG encoded byte data.public static Pix readBytes8(kotlin.Array[] pixelData, int width, int height)
Creates an 8bpp Pix object from raw 8bpp grayscale pixels.
pixelData - 8bpp grayscale pixel data.width - The width of the input image.height - The height of the input image.public static boolean replaceBytes8(Pix pixs, kotlin.Array[] pixelData, int width, int height)
Replaces the bytes in an 8bpp Pix object with raw grayscale 8bpp pixels. Width and height be identical to the input Pix.
pixs - The Pix whose bytes will be replaced.pixelData - 8bpp grayscale pixel data.width - The width of the input image.height - The height of the input image.public static Pix readFile(java.io.File file)
Creates a Pix object from encoded file data. Supported formats are BMP, JPEG, and PNG.
file - The BMP, JPEG, or PNG-encoded file to read in as a Pix.public static Pix readBitmap(android.graphics.Bitmap bmp)
Creates a Pix object from Bitmap data. Currently supports only ARGB_8888-formatted bitmaps.
bmp - The Bitmap object to convert to a Pix.