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()
Returns a factory for this object
|
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.
|
void |
setFilterType(FilterType ft)
This should rarely be used by client code.
|
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()
public FilterType getFilterUsed()
public byte[] getScanlineByte()
public byte[] getScanlineByte2()
public void readFromPngRaw(byte[] raw, int len, int offset, int step)
IImageLine
readFromPngRaw
in interface IImageLine
public void writeToPngRaw(byte[] raw)
IImageLine
writeToPngRaw
in interface IImageLine
public void endReadFromPngRaw()
IImageLine
endReadFromPngRaw
in interface IImageLine
public int getSize()
IImageLineArray
getSize
in interface IImageLineArray
public int getElem(int i)
IImageLineArray
getElem
in interface IImageLineArray
public byte[] getScanline()
public ImageInfo getImageInfo()
getImageInfo
in interface IImageLineArray
public FilterType getFilterType()
getFilterType
in interface IImageLineArray
public void setFilterType(FilterType ft)
Copyright © 2014. All rights reserved.