|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objects that implement the encoded image interface implement a particular format for storing encoded image data. This allows images to be kept in a format that is appropriate for a particular usage but simplifies the APIs that use encoded image data. This interface can ony be implemented by classes that are a part of the QTJava library; applications are not able to extend or apply usage of this interface, but can use the image encoding options that are provided.
To use objects that implement this interface you use the instanceof operator. The library ships with three types of objects that implement this interface.
The EncodedImage class contains no information about the encoding format of the image. The particular encoding format of the image data is described by the encoded image's accompanying ImageDescription object, which contains all of the metadata that is required to completely describe the format and characteristics of the encoded image data.
If you are looking at pixel values directly you should bear a couple of things in mind:
you may need to deal with the endian issue - they will be in a native endian format.
if the description describes the image data format to be something other than raw pixels
then the get methods are probably not very useful as you will not be looking at
pixel values.
ImageDescription
,
ByteEncodedImage
,
IntEncodedImage
,
RawEncodedImage
Field Summary | |
static int |
kRowBytesUnknown
This value is returned by an EncodedImage class from the getRowBytes() method if the encoded image does not know how many bytes per row or the data does not contain any extra byte data beyond the image encoding |
Method Summary | |
byte |
getByte(int offset)
Returns the byte at the specified offset. |
int |
getInt(int offset)
Returns the int at the specified offset. |
int |
getRowBytes()
Returns either kRowBytesUnknown or the number of bytes per row that the encoded image data is comprised of. |
short |
getShort(int offset)
Returns the short at the specified offset. |
int |
getSize()
Returns the size in bytes of the EncodedImage data. |
Field Detail |
public static final int kRowBytesUnknown
Method Detail |
public int getSize()
public byte getByte(int offset)
public short getShort(int offset)
public int getInt(int offset)
public int getRowBytes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |