Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.util
Interface EncodedImage

All Known Implementing Classes:
  ByteEncodedImage, IntEncodedImage, RawEncodedImage

public interface EncodedImage

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.

- RawEncodedImage - a select set of subclasses that can contain encoded images.
- ByteEncodedImage - the image data is held in a java byte array.
- IntEncodedImage - the image data is held in a java int array.

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.

See Also:
  `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

### kRowBytesUnknown

    public static final 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 Detail

### getSize

    public int getSize()

  Returns the size in bytes of the EncodedImage data. The offset is specified in bytes into the encoded image object.

### getByte

    public byte getByte(int offset)

  Returns the byte at the specified offset. The offset is specified in bytes into the encoded image object.

### getShort

    public short getShort(int offset)

  Returns the short at the specified offset. The offset is specified in bytes into the encoded image object.

### getInt

    public int getInt(int offset)

  Returns the int at the specified offset. The offset is specified in bytes into the encoded image object.

### getRowBytes

    public int getRowBytes()

  Returns either kRowBytesUnknown or the number of bytes per row that the encoded image data is comprised of. This number will at least be as big as width*pixelSize, and maybe larger.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD