This object can be (usually it is) reused while iterating over the image lines.
See scanline field, to understand the format.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final int | |
| protected FilterType | |
| public final ImageInfo | |
| private int | rown
tracks the current row number (from 0 to rows-1) |
| public final boolean | samplesUnpacked
true: each element of the scanline array represents a sample always, even for internally packed PNG formats false: if the original image was of packed type (bit depth less than 8) we keep samples packed in a single array element |
| public final ImageLine. | sampleType
tells if we are using BYTE or INT to store the samples. |
| public final int[] | scanline
The 'scanline' is an array of integers, corresponds to an image line (row). |
| public final byte[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ImageLine(final ImageInfo
Inmutable ImageInfo, basic parameter of the image we are
reading or writing imgInfo, final ImageLine.INT or BYTE : this determines which scanline is the really
used one stype,If true, we use unpacked format, even for packed original
images unpackedMode)
|
| pack-priv | ImageLine(final ImageInfo imgInfo, final ImageLine.
If a preallocated array is passed, the copy is shallow |
| Modifier and Type | Method and Description |
|---|---|
| public FilterType | |
| public int | |
| public byte[] | |
| public int[] | |
| pack-priv static void | packInplaceByte(final ImageInfo iminfo, final byte[] src, final byte[] dst, final boolean scaled)
size original: samplesPerRow sizeFinal: samplesPerRowPacked (trailing elements are trash!) |
| pack-priv static void | |
| public ImageLine | packToNewImageLine()
Creates a new ImageLine similar to this, but packed The caller must be sure that the original was really unpacked |
| public void | |
| public void | |
| public static void | |
| public String | |
| pack-priv static void | |
| pack-priv static void | |
| public ImageLine | unpackToNewImageLine()
Creates a new ImageLine similar to this, but unpacked The caller must be sure that the original was really packed |
| bitDepth | back to summary |
|---|---|
| pack-priv final int bitDepth | |
| channels | back to summary |
|---|---|
| pack-priv final int channels | |
| elementsPerRow | back to summary |
|---|---|
| pack-priv final int elementsPerRow | |
| filterUsed | back to summary |
|---|---|
| protected FilterType filterUsed | |
| imgInfo | back to summary |
|---|---|
| public final ImageInfo imgInfo | |
| rown | back to summary |
|---|---|
| private int rown tracks the current row number (from 0 to rows-1) | |
| samplesUnpacked | back to summary |
|---|---|
| public final boolean samplesUnpacked true: each element of the scanline array represents a sample always, even for internally packed PNG formats false: if the original image was of packed type (bit depth less than 8) we keep samples packed in a single array element | |
| sampleType | back to summary |
|---|---|
| public final ImageLine. tells if we are using BYTE or INT to store the samples. | |
| scanline | back to summary |
|---|---|
| public final int[] scanline The 'scanline' is an array of integers, corresponds to an image line (row).
Except for 'packed' formats (gray/indexed with 1-2-4 bitdepth) each
For bitdepth=1/2/4 , and if samplesUnpacked=false, each value is a PACKED
byte!
To convert a indexed line to RGB balues, see
| |
| scanlineb | back to summary |
|---|---|
| public final byte[] scanlineb Same as | |
| ImageLine | back to summary |
|---|---|
| public ImageLine(final ImageInfo imgInfo) default mode: INT packed | |
| ImageLine | back to summary |
|---|---|
public ImageLine(final ImageInfo imgInfo, final ImageLine.
| |
| ImageLine | back to summary |
|---|---|
| pack-priv ImageLine(final ImageInfo imgInfo, final ImageLine. If a preallocated array is passed, the copy is shallow | |
| getFilterUsed | back to summary |
|---|---|
| public FilterType getFilterUsed() | |
| getRown | back to summary |
|---|---|
| public int getRown() This row number inside the image (0 is top) | |
| getScanlineByte | back to summary |
|---|---|
| public byte[] getScanlineByte() | |
| getScanlineInt | back to summary |
|---|---|
| public int[] getScanlineInt() | |
| packInplaceByte | back to summary |
|---|---|
| pack-priv static void packInplaceByte(final ImageInfo iminfo, final byte[] src, final byte[] dst, final boolean scaled) size original: samplesPerRow sizeFinal: samplesPerRowPacked (trailing elements are trash!) | |
| packInplaceInt | back to summary |
|---|---|
| pack-priv static void packInplaceInt(final ImageInfo iminfo, final int[] src, final int[] dst, final boolean scaled) | |
| packToNewImageLine | back to summary |
|---|---|
| public ImageLine packToNewImageLine() Creates a new ImageLine similar to this, but packed The caller must be sure that the original was really unpacked | |
| setFilterUsed | back to summary |
|---|---|
| public void setFilterUsed(final FilterType ft) | |
| setRown | back to summary |
|---|---|
| public void setRown(final int n) Sets row number (0 : Rows-1) | |
| showLineInfo | back to summary |
|---|---|
| public static void showLineInfo(final ImageLine line) Prints some statistics - just for debugging | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Basic info
| |
| unpackInplaceByte | back to summary |
|---|---|
| pack-priv static void unpackInplaceByte(final ImageInfo iminfo, final byte[] src, final byte[] dst, final boolean scale) | |
| unpackInplaceInt | back to summary |
|---|---|
| pack-priv static void unpackInplaceInt(final ImageInfo iminfo, final int[] src, final int[] dst, final boolean scale) | |
| unpackToNewImageLine | back to summary |
|---|---|
| public ImageLine unpackToNewImageLine() Creates a new ImageLine similar to this, but unpacked The caller must be sure that the original was really packed | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ImageLine. | |
| public static final ImageLine. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ImageLine. | |
| public static ImageLine. |
| BYTE | back to summary |
|---|---|
| public static final ImageLine. | |
| INT | back to summary |
|---|---|
| public static final ImageLine. | |
| SampleType | back to summary |
|---|---|
| private SampleType() | |
| valueOf | back to summary |
|---|---|
| public static ImageLine. | |
| values | back to summary |
|---|---|
| public static ImageLine. | |