public class ByteBGRConverter extends PixelConverterimplements BytePixelIterator
PixelConverter that converts all data to BGR-formatted bytes.
TYPE_3BYTE_RGB, TYPE_4BYTE_ARGB, TYPE_4BYTE_ARGB_PRE, TYPE_4BYTE_BGRA| Constructor and Description |
|---|
ByteBGRConverter(PixelIterator
|
| Modifier and Type | Method and Description |
|---|---|
IndexColorModel |
getIndexColorModel()
|
int |
getMinimumArrayLength()
The minimum length an array should be that is used to retrieve a row of pixel data.
|
int |
getPixelSize()
The number of array elements used to store 1 pixel.
|
int |
getType()
The format of this pixel iterator.
|
void |
next(byte[] dest)
Reads a row of pixel data.
|
void |
skip()
Skips a row of pixel data.
|
getHeight, getWidth, isDone, isOpaque, isOpaque, isTopDownpublic ByteBGRConverter(PixelIteratori)
i -
public void skip()
PixelIterator
public void next(byte[] dest)
BytePixelIterator
next in interface
BytePixelIterator
dest - the array to store the pixels in
public IndexColorModelgetIndexColorModel()
public int getMinimumArrayLength()
PixelIterator
When you call next(array) on this iterator, the array's length should at least be getMinimumArrayLength().
(Note the next() method is not in this interface: it exists in the subinterfaces: BytePixelIterator and IntPixelIterator.
You should not assume you know what this value is. For example: If an iterator is actually a 4-byte iterator that is reducing to a 3-byte format, then this value may be 4*getWidth() instead of the expected 3*getWidth(). Conversion and scaling is performed in the original array if possible to minimize overhead.
getMinimumArrayLength in interface
PixelIterator
public int getType()
PixelIterator
public int getPixelSize()
PixelIterator
So in TYPE_4BYTE_ARGB this will be 4, but in TYPE_INT_ARGB this will be 1.
getPixelSize in interface
PixelIterator