The QTPlgImportImage class provides QTPlugin developers with a simple interface to access the services provided by the QuickTime’s graphics importer components. The class uses the Component Manager to open and close a connection to the component; QTPlugin developers do not worry about it, cause the QTPlgImportImage takes care about the details of opening and closing a connection to the graphics importer component selected.
You can use the class to import graphics data from a location specified via a class instance and display the result to the user; also, you can use the class to obtain export parameters1 from the user (using the standard export dialog box) and to manage the process of exporting the image1. You can follow several ways to control the different steps involved into the exporting process.
Once collected, the class allows you to store the export parameters you have set into files and restore them later.
Note 1: before the introduction of the graphics exporter components in QuickTime 4.0 (see the documentation for
the class), the export of images was accomplished by
the graphics importer components as well; so, in the remote case you must use QuickTime libraries older than 4, you can use the services of this
class to perform export operations.
→
The QTPlgImportImage class constructors are called when you create a new instance of the class, while the ˜QTPlgImportImage class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. See the validity requirements for more details.
The class provides you with the following initializer methods:
(dataSource as )
As the selection of an appropriate graphics importer depends on the type of graphics data to import, the class implements this constructor version
only. The new class instance will try to locate and open a graphics importer component for the data reference specified by the
dataSource parameter; if a graphics importer cannot be found using the file’s type, file extension, or MIME type
the class
instance will and you
should get rid of it; otherwise, the properties of the class will be initialized to the default settings of the importer found and it
will already be set up to draw from the specified data reference
specifies the number of images in an imported image
this property requires QuickTime 4 or later
specifies the current image index for an imported image. This property can assume values ranging from 0 to
–1
this property requires QuickTime 4 or later
returns the selected imported image after any
and
have been applied
this property requires QuickTime 4 or later
returns as a Core Graphics CGImage reference the selected imported image after any
and
have been applied. You can use the
value returned in Declare statements
this property requires QuickTime 6.4 or later and MacOS X
determines if the graphics importer has to perform gamma correction
specifies a set of graphics transformations to apply to the selected imported image
retrieves user data from an imported image file
specifies the settings that will be applied to the imported image. In this context, the following
will be used:
returns a data presentation context appropriate to the current
and
(dest as )
use this method to extract user data from an imported image file and add it to the user data specified by the
dest parameter
() as picture
using this method you obtain a picture of the selected imported image after any
and
have been applied. Using
this method is equivalent to retrieve the image by the
class property