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

## quicktime.app.image
Class ImageUtil

    java.lang.Object
      |
      +--quicktime.app.image.ImageUtil

public final class ImageUtil
extends java.lang.Object

Some utility routines for dealing with images

Field Summary
`static int` | `kHitTestRgnSrc` This is the OSType that is used to create hit test data for kAnimationCodec compressed images

Method Summary
`static ImageDataSequence` | `createSequence(java.io.File matchFile)` This routine will create an ImageDataSeqeuence object from the collection of files that are found in the specified directory that begin with the specified fileName.
`static ImageDataSequence` | `createSequence(java.io.File matchFile, FileFilter ff)` This routine will create an ImageDataSeqeuence object from the collection of files that are found in the specified directory that begin with the specified fileName.
`static ImageDataSequence` | `createSequence(Track imageTrack)` This routine will create an ImageDataSeqeuence object from specified Track of a Movie.
`static ImageDataSequence` | `makeTransparent(ImageDataSequence image, QDColor keyColor, QDGraphics gw, Region[] r)` Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw.
`static ImageDataSequence` | `makeTransparent(ImageSpec image, QDColor keyColor)` Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw.
`static ImageDataSequence` | `makeTransparent(ImageSpec image, QDColor keyColor, QDGraphics gw)` Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw.
`static ImageDataSequence` | `makeTransparent(ImageSpec image, QDColor keyColor, QDGraphics gw, Region r)` Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### kHitTestRgnSrc

    public static final int kHitTestRgnSrc

  This is the OSType that is used to create hit test data for kAnimationCodec compressed images

Method Detail

### makeTransparent

    public static ImageDataSequence makeTransparent(ImageSpec image,
                                                    QDColor keyColor)
                                             throws QTException

  Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw. It uses the animation codec to do this, and there is no loss in quality. This will also have a default behaviour of setting the hit test region of the image data to the pixels that are drawn when the hitTestImageData flags are specified. The images will be compressed at a default setting of 16bit resolution.
  Parameters:
    `images` - the images to be worked
    `keyColor` - the color that will be removed from the images appearance
  Returns:
    an ImageDataSequence object that contains the new images

### makeTransparent

    public static ImageDataSequence makeTransparent(ImageSpec image,
                                                    QDColor keyColor,
                                                    QDGraphics gw)
                                             throws QTException

  Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw. It uses the animation codec to do this, and there is no loss in quality. This will use the depth of the supplied QDGraphics to compress into - pixel sizes other than 8, 16, or 32 will throw an exception. This will also have a default behaviour of setting the hit test region of the image data to the pixels that are drawn when the hitTestImageData flags are specified.
  Parameters:
    `keyColor` - the color that will be removed from the images appearance
    `gw` - the QDGraphics that is used to contain the depth and pixel data of the recompressed image(s). This graphics should be the size of the image (or a portion) that will be used to determine which parts of the image are compressed.
  Returns:
    an ImageDataSequence object that contains the new images

### makeTransparent

    public static ImageDataSequence makeTransparent(ImageSpec image,
                                                    QDColor keyColor,
                                                    QDGraphics gw,
                                                    Region r)
                                             throws QTException

  Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw. It uses the animation codec to do this, and there is no loss in quality. This will use the depth of the supplied QDGraphics to compress into - pixel sizes other than 8, 16, or 32 will throw an exception. The r parameter allows the application to specify a Region that is used as a hit-test region - whether pixels are visible from this image at those locations or not. The hit-test Region will be applied to all of the images.
  Parameters:
    `images` - the images to be worked
    `keyColor` - the color that will be removed from the images appearance
    `gw` - the QDGraphics that is used to contain the depth and pixel data of the recompressed image(s). This graphics should be the size of the image (or a portion) that will be used to determine which parts of the image are compressed.
    `r` - a hit test Region
  Returns:
    an ImageDataSequence object that contains the new images

### makeTransparent

    public static ImageDataSequence makeTransparent(ImageDataSequence image,
                                                    QDColor keyColor,
                                                    QDGraphics gw,
                                                    Region[] r)
                                             throws QTException

  Takes an ImageSpec object and recompresses the images so that the images have the keyColor set as a transparent colour that will not draw. It uses the animation codec to do this, and there is no loss in quality. This will use the depth of the source image to map the colour into. This will use the depth of the supplied QDGraphics to compress into - pixel sizes other than 8, 16, or 32 will throw an exception. The r parameter allows the application to specify an array of Regions that are used as hit-test regions - whether pixels are visible from this image at those locations or not. This array must at least be the same length as the number of images in the sequence. As each image is recompressed the corresponding element of the Region array will be used as the hit-test Region for that image.
  Parameters:
    `images` - the images to be worked
    `keyColor` - the color that will be removed from the images appearance
    `gw` - the QDGraphics that is used to contain the depth and pixel data of the recompressed image(s). This graphics should be the size of the image (or a portion) that will be used to determine which parts of the image are compressed.
    `r` - an array of Regions that supply hit test data for each image in the sequence.
  Returns:
    an ImageDataSequence object that contains the new images

### createSequence

    public static ImageDataSequence createSequence(Track imageTrack)
                                            throws QTException

  This routine will create an ImageDataSeqeuence object from specified Track of a Movie. This method gets image data that matches the first sample description that is contained in the track, loads the individual frames into memory and returns an ImageDataSequence that contains the image data as described by this ImageDescription.
  Parameters:
    `imageTrack` - this track contains image data - it must contain a VideoMedia object.
  Returns:
    a ImageDataSequence object that contains a sequence of image data and a single description that defines the compression, bounds, etc. that is common to all of the image data objects

### createSequence

    public static ImageDataSequence createSequence(java.io.File matchFile)
                                            throws java.io.IOException,
                                                   QTException

  This routine will create an ImageDataSeqeuence object from the collection of files that are found in the specified directory that begin with the specified fileName. The default FileFilter object is passed in as the filter. The default ImageUtil object is passed in as the image processor object.
  Parameters:
    `matchFile` - this should be the full path specification of a file that will be used as a pattern to match against the other files that are contained in the directory that the match file is found in.
  Returns:
    a ImageDataSequence object that contains a sequence of image data and a single description that defines the compression, bounds, etc. that is common to all of the image data objects
  See Also:
    `for a description of the format of the file name that this filter will deal with.`

### createSequence

    public static ImageDataSequence createSequence(java.io.File matchFile,
                                                   FileFilter ff)
                                            throws java.io.IOException,
                                                   QTException

  This routine will create an ImageDataSeqeuence object from the collection of files that are found in the specified directory that begin with the specified fileName. You supply a FileFilter object to do custom filter operations. The default ImageUtil object is passed in as the image processor object.
  Parameters:
    `matchFile` - this should be the full path specification of a file that will be used as a pattern to match against the other files that are contained in the directory that the match file is found in.
    `ff` - the file filter object
  Returns:
    a ImageDataSequence object that contains a sequence of image data and a single description that defines the compression, bounds, etc. that is common to all of the image data objects
  See Also:
    `for a description of the format of the file name that this filter will deal with and the methods that can be overridden or extended.`

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