|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.std.image.QTImage
The QTImage class provides static methods and constants for compressing and decompressing QuickTime images.
Instance of this class can be used to associate an ImageDescription with the encoded Image data that the description describes.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
QTImage(ImageDescription id,
EncodedImage im)
Associate an image description with the image data that is described by the description. |
Method Summary | |
static ImageDescription |
compress(QDGraphics src,
QDRect srcRect,
int quality,
int cType,
EncodedImage data)
Compresses a single frame image that is currently stored as a pixel map. |
static ImageDescription |
convert(ImageDescription srcDD,
EncodedImage srcData,
int colorDepth,
ColorTable clut,
int accuracy,
int quality,
int cType,
CodecComponent codec,
EncodedImage dstData)
Converts the format of a compressed image. |
static void |
decompress(EncodedImage data,
ImageDescription desc,
QDGraphics dst,
QDRect dstRect,
int mode)
Decompresses a single frame image into a pixel map structure. |
static void |
decompress(EncodedImage data,
ImageDescription desc,
QDGraphics dst,
QDRect srcRect,
QDRect dstRect,
int mode,
Region mask)
Decompresses a single frame image into a pixel map structure. |
static ImageDescription |
fCompress(QDGraphics src,
QDRect srcRect,
int colorDepth,
int quality,
int cType,
CodecComponent c,
ColorTable clut,
int flags,
EncodedImage data)
Compresses a single frame image that is currently stored as a pixel map. |
static void |
fDecompress(EncodedImage data,
ImageDescription desc,
QDGraphics dst,
QDRect srcRect,
Matrix matrix,
int mode,
Region mask,
PixMap matte,
QDRect matteRect,
int accuracy,
CodecComponent codec)
Decompresses a single frame image into a pixel map structure. |
static int |
getCompressedSize(ImageDescription desc,
EncodedImage data)
Determines the size in bytes of a compressed image. |
static int |
getCompressionTime(QDGraphics src,
QDRect srcRect,
int colorDepth,
int cType,
CodecComponent c,
int spatialQuality,
int temporalQuality)
Determines the estimated amount of time required to compress a given image. |
ImageDescription |
getDescription()
Return the description that describes the associated data. |
EncodedImage |
getImage()
Return the image data |
static int |
getMaxCompressionSize(QDGraphics src,
QDRect srcRect,
int colorDepth,
int quality,
int cType,
CodecComponent c)
Determines the maximum size an image will be after compression. |
static float |
getSimilarity(QDGraphics src,
QDRect srcRect,
ImageDescription desc,
EncodedImage data)
Compares a compressed image to a picture stored in a pixel map and returns a value indicating the relative similarity of the two images. |
static void |
trim(ImageDescription desc,
EncodedImage inData,
EncodedImage outData,
QDRect trimRect)
Ajusts a compressed image to the boundaries defined by a QDRect specified by your application. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QTImage(ImageDescription id, EncodedImage im)
id
- the image descriptionim
- the image dataMethod Detail |
public EncodedImage getImage()
public ImageDescription getDescription()
public static final ImageDescription compress(QDGraphics src, QDRect srcRect, int quality, int cType, EncodedImage data) throws QTException
src
- the QDGraphics that contains the PixMap for compressing. This may NOT be null.srcRect
- a Rect defining the portion of the image to compressquality
- the desired compressed image qualitycType
- a compressor typedata
- a encoded image object to receive the compressed image data.
It is your program's responsibility to make sure that this
object can receive at least as much data as indicated by
the getMaxCompressionSize method.public static final ImageDescription fCompress(QDGraphics src, QDRect srcRect, int colorDepth, int quality, int cType, CodecComponent c, ColorTable clut, int flags, EncodedImage data) throws QTException
src
- a QDGraphics that contains the PixMap for compressing. This may NOT be null.srcRect
- a QDRect defining the portion of the image to compresscolorDepth
- the depth at which the image is likely to be viewedquality
- the desired compressed image qualitycType
- a compressor typec
- a compressor or codec identifierclut
- a custom color lookup tableflags
- flags providing further control informationdata
- a EncodedImage object to receive the compressed image data.
It is your program's responsibility to make sure that this
object can receive at least as much data as indicated by
the getMaxCompressionSize method.public static final ImageDescription convert(ImageDescription srcDD, EncodedImage srcData, int colorDepth, ColorTable clut, int accuracy, int quality, int cType, CodecComponent codec, EncodedImage dstData) throws QTException
srcDD
- the image description structure that describes the compressed imagesrcData
- the encoded image data to convertcolorDepth
- the depth at which the recompressed image is likely to be viewedclut
- a custom color look up tableaccuracy
- the accuracy for the decompressed imagequality
- the desired compressed image qualitycType
- the compressor typecodec
- a CodecComponentdestData
- a EncodedImage object to receive the converted image data.
It is your program's responsibility to make sure that this
object can receive at least as much data as indicated by
the getMaxCompressionSize method.public static final void trim(ImageDescription desc, EncodedImage inData, EncodedImage outData, QDRect trimRect) throws StdQTException
desc
- an ImageDescription object that describes the compressed image.
On return from this method, the compressor updates this image
description to refer to the resized image.inData
- the encoded image dataoutData
- a encoded image object to receive the trimmed image. Your application
should create this object at least as large as the source image.trimRect
- defines the desired dimensions of the trimmed imagepublic static final void decompress(EncodedImage data, ImageDescription desc, QDGraphics dst, QDRect dstRect, int mode) throws StdQTException, QDException
data
- a EncodedImage object that contains the compressed image datadesc
- an ImageDescription object that defines the compressed imagedst
- a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.dstRect
- a QDRect into which the decompressed image is to be loadedmode
- the transfer mode for the operationpublic static final void decompress(EncodedImage data, ImageDescription desc, QDGraphics dst, QDRect srcRect, QDRect dstRect, int mode, Region mask) throws StdQTException, QDException
data
- a EncodedImage object that contains the compressed image datadesc
- an ImageDescription object that defines the compressed imagedst
- a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.srcRect
- a QDRect defining the portion of the image to decompressdstRect
- a QDRect into which the decompressed image is to be loadedmode
- the transfer mode for the operationmask
- a clipping region in the destination coordinate systempublic static final void fDecompress(EncodedImage data, ImageDescription desc, QDGraphics dst, QDRect srcRect, Matrix matrix, int mode, Region mask, PixMap matte, QDRect matteRect, int accuracy, CodecComponent codec) throws StdQTException, QDException
data
- a EncodedImage object that contains the compressed image datadesc
- an ImageDescription object that defines the compressed imagedst
- a QDGraphics that contains the PixMap where the decompressed image is to be displayed. This may NOT be null.srcRect
- a QDRect defining the portion of the image to decompressmatrix
- a Matrix specifies how to transform the image during decompressionmode
- the transfer mode for the operationmask
- a Region in the destination coordinate systemmatte
- a PixMap that contains a blend mattematteRect
- a QDRect defining a portion of the blend matte to applyaccuracy
- the accuracy desired in the decompressed imagecodec
- a codec componentpublic static final int getMaxCompressionSize(QDGraphics src, QDRect srcRect, int colorDepth, int quality, int cType, CodecComponent c) throws StdQTException, QDException
src
- is a QDGraphics that contains the PixMap to be compressed. This may NOT be null.srcRect
- points to the QDRect defining the portion of the
source image that is to be compressedcolorDepth
- the depth at which the image is to be compressedquality
- the desired compressed image qualitycType
- a compressor typec
- a compressor componentpublic static final int getCompressedSize(ImageDescription desc, EncodedImage data) throws StdQTException
desc
- an ImageDescription object that defines the compressed imagedata
- a EncodedImage object that contains the compressed image datapublic static final int getCompressionTime(QDGraphics src, QDRect srcRect, int colorDepth, int cType, CodecComponent c, int spatialQuality, int temporalQuality) throws StdQTException, QDException
src
- a QDGraphics that contains a PixMap object that will be compressed. This may be null.srcRect
- a QDRect defining the portion of the source image that is
to be compressedcolorDepth
- the depth at which the image is to be compressedcType
- a compressor typec
- the compressor componentspatialQuality
- the desired compressed image spatial qualitytemporalQuality
- the desired compressed image temporal qualitypublic static final float getSimilarity(QDGraphics src, QDRect srcRect, ImageDescription desc, EncodedImage data) throws StdQTException, QDException
src
- a QDGraphics that contains a PixMap object containing a noncompressed image.srcRect
- a QDRect defining the portion of the source image to compare
to the compressed imagedesc
- an ImageDescription object that defines the compressed imagedata
- an EncodedImage object that contains the compressed image data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |