public class ImageLineByte extends Object implements IImageLine, IImageLineArray
This object can be (usually it is) reused while iterating over the image lines.
See scanline field, to understand the format.
Format: byte (one bytes per sample) (for 16bpp the extra byte is placed in an extra array)
| Modifier and Type | Field and Description |
|---|---|
protected FilterType |
filterType |
ImageInfo |
imgInfo |
| Constructor and Description |
|---|
ImageLineByte(ImageInfo imgInfo) |
ImageLineByte(ImageInfo imgInfo,
byte[] sci) |
| Modifier and Type | Method and Description |
|---|---|
void |
endReadFromPngRaw()
This is called when the read for the line has been completed (eg for interlaced).
|
int |
getElem(int i)
Get i-th element of array (for 0 to size-1).
|
static IImageLineFactory<ImageLineByte> |
getFactory(ImageInfo iminfo) |
FilterType |
getFilterType() |
FilterType |
getFilterUsed() |
ImageInfo |
getImageInfo() |
byte[] |
getScanline() |
byte[] |
getScanlineByte()
One byte per sample.
|
byte[] |
getScanlineByte2()
only for 16bpp (less significant byte)
|
int |
getSize()
length of array (should correspond to samples)
|
void |
readFromPngRaw(byte[] raw,
int len,
int offset,
int step)
Extract pixels from a raw unlfilterd PNG row.
|
String |
toString()
Basic info
|
void |
writeToPngRaw(byte[] raw)
Writes the line to a PNG raw byte array, in the unfiltered PNG format Notice that the first
byte is the filter type, you should write it only if you know it.
|
public final ImageInfo imgInfo
protected FilterType filterType
public ImageLineByte(ImageInfo imgInfo)
public ImageLineByte(ImageInfo imgInfo, byte[] sci)
public static IImageLineFactory<ImageLineByte> getFactory(ImageInfo iminfo)
public FilterType getFilterUsed()
public byte[] getScanlineByte()
public byte[] getScanlineByte2()
public void readFromPngRaw(byte[] raw,
int len,
int offset,
int step)
IImageLinereadFromPngRaw in interface IImageLinepublic void writeToPngRaw(byte[] raw)
IImageLinewriteToPngRaw in interface IImageLinepublic void endReadFromPngRaw()
IImageLineendReadFromPngRaw in interface IImageLinepublic int getSize()
IImageLineArraygetSize in interface IImageLineArraypublic int getElem(int i)
IImageLineArraygetElem in interface IImageLineArraypublic byte[] getScanline()
public ImageInfo getImageInfo()
getImageInfo in interface IImageLineArraypublic FilterType getFilterType()
getFilterType in interface IImageLineArrayCopyright © 2014. All rights reserved.