Contents
Navigation
Home User Reference Other Resources


The QTPlgExportImage class provides QTPlugin developers with a simple interface to access the services provided by the QuickTime’s graphics exporter 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 QTPlgExportImage takes care about the details of opening and closing a connection to the graphics exporter component of interest.
You can use the class to obtain export parameters from the user (or set them by yourself) and to manage the process of exporting the image. You can follow several ways to control the different steps involved into the exporting process.
The simplest way is to use the standard export dialog box. The dialog box presents a consistent interface to the user; the QTPlgExportImage eliminates the need for you to worry about the details of managing this dialog box. Once you have collected the parameter information from the user, you can use the class to instruct the component to export the selected image. Again, the class manages the details for you.
Alternatively, you can use the methods the class provides you with to examine or modify the parameters to be used during the export. This way allows you to perform the process of exporting the image without using any user interface.
Whatever way you follow, the class allows you to store the compression parameters you have set into files and restore them later.
This class requires QuickTime 4.0 or later.





The QTPlgExportImage class constructors are called when you create a new instance of the class, while the ˜QTPlgExportImage 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:
()
This is the default constructor. The new class instance will try to open a connection to the JPEG graphics exporter; if the connection succeeds, the properties of the class will be initialized to the default settings of the the JPEG graphics exporter
(other as QTPlgExportImage)
This is the copy constructor. The properties of the object to be copied will be used to initialize the new class instance properties
(fSettings as folderitem)
The new class instance will try to open a connection to the graphics exporter registered into the file settings specified by the fSettings parameter; if the connection succeeds, you can use this version of the class constructor to initialize the properties of the class with the settings in the file specified by the fSettings parameter
(exporterID as string)
The new class instance will try to open a connection to the graphics exporter defined by the exporterID parameter; this parameter is a four char ASCII code that identifies the of the graphics exporter you want to connect to. As a convenience, the class defines the of the graphics exporters provided by QuickTime. If the connection succeeds, the properties of the class will be initialized to the default settings of the selected graphics exporter
(component as )
The new class instance will try to open a connection to the graphics exporter specified by the component parameter; you can obtain a list of all of the currently installed graphics exporters by using the method of the module passing the appropriate to it. If the connection succeeds, the properties of the class will be initialized to the default settings of the selected graphics exporter

identifies the default file extension defined for the graphics exporter component in use
defines a desired maximum data size (in bytes) for a graphics export operation and asks for a quality that does not exceed that size
determines whether the original compressed data for a graphics export operation will not be decompressed and recompressed, but be copied through to the output file. Even though it is not decompressed and recompressed, graphics data may be modified when it is copied through
determines whether or not the graphics exporter component should create Exif files. Turning on this property disables incompatible settings, such as grayscale JPEG and compressed TIFF, and enables export of Exif metadata. Use the class property to supply Exif metadata. This routine is only supported by the TIFF and JPEG graphics exporters
requires QuickTime 6.0 or later. Not available to Carbon QTPlugin version
determines whether or not the graphics exporter component should create an embedded thumbnail inside the exported file. This property is currently only supported by the TIFF and JPEG graphics exporters. The JPEG graphics exporter can only create thumbnails when writing Exif files
requires QuickTime 6.0 or later. Not available to Carbon QTPlugin version
defines supplemental data for a graphics export operation, such as copyright text
specifies the settings that will be applied to the export process. In this context, the following will be used:
If you want to specify the entire source image as target of the export operation, you should let the and properties set to 0

(src as folderitem, dst as folderitem)
use this method to perform the export of the image file specified by the src parameter and store the output image to the file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one.
The source image file format must be one of those supported by the QuickTime’s graphics importer component
returns nothing. Check the class property for errors
(p as picture, dst as folderitem)
use this method to perform the export of the image specified by the p parameter and store the output image to the file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one
returns nothing. Check the class property for errors
(p as picture, byref buffer as memoryblock)
use this method to perform the export of the picture specified by the p parameter and manage the results of the operation by yourself. On success, the method will allocate a buffer in memory of appropriate size and will store the output image data there; you can obtain the size of the data by inspecting the size property of the newly allocated memoryblock
returns nothing. Check the class property for errors
(m as , tm as integer, dst as folderitem)
use this method to perform the export of the frame of the movie specified by the m parameter and store the output image to the file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one.
The tm parameter indicates the time of interest within the movie and must be expressed in movie’s time scale
returns nothing. Check the class property for errors
(src as integer, dst as folderitem)
by this method you can export a Core Graphics CGImage or a CGBitmapContext, whose instance is specified by the src parameter, and store the output image to the file specified by the dst parameter. If the destination file already exists, it will be overwritten by the new one
returns nothing. Check the class property for errors
this method requires QuickTime 6.4 or later and MacOS X


specifies the quicktime jpeg exporter component subtype
specifies the quicktime bmp exporter component subtype
specifies the quicktime png exporter component subtype
specifies the quicktime macpaint exporter component subtype
specifies the quicktime photoshop exporter component subtype
specifies the quicktime targa exporter component subtype
specifies the quicktime tiff exporter component subtype
specifies the quicktime silicon graphics exporter component subtype