public class ReadFile extends Object
Constructor and Description |
---|
ReadFile() |
Modifier and Type | Method and Description |
---|---|
static Pix |
readBitmap(Bitmap bmp)
Creates a Pix object from Bitmap data.
|
static Pix |
readBytes8(byte[] pixelData,
int width,
int height)
Creates an 8bpp Pix object from raw 8bpp grayscale pixels.
|
static Pix |
readFile(File file)
Creates a Pix object from encoded file data.
|
static Pix |
readMem(byte[] encodedData)
Creates a 32bpp Pix object from encoded data.
|
static boolean |
replaceBytes8(Pix pixs,
byte[] pixelData,
int width,
int height)
Replaces the bytes in an 8bpp Pix object with raw grayscale 8bpp pixels.
|
public static Pix readMem(byte[] encodedData)
encodedData
- BMP, JPEG, or PNG encoded byte data.public static Pix readBytes8(byte[] pixelData, int width, int height)
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, byte[] pixelData, int width, int height)
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(File file)
file
- The BMP, JPEG, or PNG-encoded file to read in as a Pix.