next up previous
Next: QuickTime For Java Presenters Up: Media Data and Movies Previous: Media Data and Movies

The ImageSpec Interface

The ImageSpec interface expresses the close relationship between image data and an ImageDescription that describes it. Figure 9.4 illustrates all of the ImageSpec-derived classes in the QuickTime for Java API.


The ImageSpec Interface

The image data itself is represented by an object that implements the EncodedImage interface. This interface allows image data to be stored in either a (Java) int or byte array. Any object that implements the ImageSpec interface can have its image rendered by either the ImagePresenter to a destination QDGraphics or by a TwoDSprite to its container SWCompositor.

The ImageSpec interface expresses the commonality of QuickTime's media model, specifically with regard to image data, and unifies the many possible constructions and imaging services that QuickTime provides. If your application requires a particular format for generating image data, then it can implement the ImageSpec interface and thus have QuickTime use this custom class wherever the QuickTime for Java API uses existing ImageSpec objects.

The Compositable and DynamicImage interfaces extend the ImageSpec interface. The Compositable interface captures the ability of image data to have a graphics mode applied to it when it is rendered. Graphics modes include rendering effects such as transparency, where any pixels of a particular color in the image data won't be drawn, and blending, where all of the drawn colors of an image are blended with a blend color to alter the rendered image.

The DynamicImage interface extends Compositable and expresses the fact that some pixel data may change. This interface is used by the Compositor, as a TwoDSprite must invalidate its Sprite if the pixel data changes.


next up previous
Next: QuickTime For Java Presenters Up: Media Data and Movies Previous: Media Data and Movies
Dave Marshall
10/4/2001