public final class RasterConverter extends Object
Util class for transforming unpacked raster data. Notions: Raw raster data - raster data with one byte for one pixel distribution. if byte equals 0 - color is white, otherwise is black. Unpacked raster data - raster data with one bit of byte for one pixel in a raster image. if bit equals 0 - color is white, otherwise is black.
Constructor and Description |
---|
RasterConverter() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
convertBetwenBits(byte[] data,
int width,
int height,
int fromBitsPerPixel,
int toBitsPerPixel)
Converts Unpacked raster data with one BitsPerPixel format to another BitsPerPixelFormat.
|
public static byte[] convertBetwenBits(byte[] data, int width, int height, int fromBitsPerPixel, int toBitsPerPixel)
Converts Unpacked raster data with one BitsPerPixel format to another BitsPerPixelFormat.
data
- Unpacked raster datawidth
- width of raster image.height
- height of raster image.fromBitsPerPixel
- BitsPerPixel format of input raster. Must be between 1 and 8 conclusively.toBitsPerPixel
- BitsPerPixel format for output raster. Must be between 1 and 8 conclusively.Copyright © 2016 Aspose. All Rights Reserved.