-
public class ReadFileImage input and output methods.
-
-
Method Summary
Modifier and Type Method Description static PixreadMem(Array<byte> encodedData)Creates a 32bpp Pix object from encoded data. static PixreadBytes8(Array<byte> pixelData, int width, int height)Creates an 8bpp Pix object from raw 8bpp grayscale pixels. static booleanreplaceBytes8(Pix pixs, Array<byte> 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. static PixreadFile(File file)Creates a Pix object from encoded file data. static PixreadBitmap(Bitmap bmp)Creates a Pix object from Bitmap data. -
-
Method Detail
-
readMem
static Pix readMem(Array<byte> encodedData)
Creates a 32bpp Pix object from encoded data. Supported formats are BMP,JPEG, and PNG.
- Parameters:
encodedData- BMP, JPEG, or PNG encoded byte data.
-
readBytes8
static Pix readBytes8(Array<byte> pixelData, int width, int height)
Creates an 8bpp Pix object from raw 8bpp grayscale pixels.
- Parameters:
pixelData- 8bpp grayscale pixel data.width- The width of the input image.height- The height of the input image.
-
replaceBytes8
static boolean replaceBytes8(Pix pixs, Array<byte> 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.
- Parameters:
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.
-
readFile
static Pix readFile(File file)
Creates a Pix object from encoded file data. Supported formats are BMP,JPEG, and PNG.
- Parameters:
file- The BMP, JPEG, or PNG-encoded file to read in as a Pix.
-
readBitmap
static Pix readBitmap(Bitmap bmp)
Creates a Pix object from Bitmap data. Currently supports onlyARGB_8888-formatted bitmaps.
- Parameters:
bmp- The Bitmap object to convert to a Pix.
-
-
-
-