Mac Developer Library

Developer

Frameworks Framework Reference Import and Export Reference for QuickTime

Options
Deployment Target:

On This Page
Language:

Import and Export Reference for QuickTime

Image importers and exporters manage the import and export of graphic images, such as JPEG, TIFF, Photoshop, and PNG. Movie data exchange components support the import and export of other multimedia formats, such as AIFF, WAVE, AVI, MPEG-1, MIDI, MPEG-4, 3GPP, MP3, MPEG-2, H.263, and OpenDML. QuickTime can open any format file for which it has an importer and create any for which it has an exporter.

Functions

  • Draws a rectangular portion of the input image in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportDrawInputImage ( GraphicsExportComponent ci, CGrafPtr gw, GDHandle gd, const Rect *srcRect, const Rect *dstRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    gw

    A pointer to an offscreen graphics world, color graphics port, or basic graphics port.

    gd

    A handle to a GDevice record. If you pass a pointer to an offscreen graphics world in the gw parameter, set this parameter to NIL because GraphicsExportDrawInputImage ignores this parameter and sets the current device to the device attached to the offscreen graphics world.

    srcRect

    Specifies a portion of the input image.

    dstRect

    Specifies where in the drawing environment to draw that portion of the input image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The gw and gd parameters specify a drawing environment such as you might pass to GraphicsExportSetInputGWorld. The srcRect and dstRect boundaries need not be the same width and height; you can use this function to scale the srcRect image portion. This would be useful, for example, if you were writing a graphics exporter for a multiple-resolution format.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the depth of the input image for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputImageDepth ( GraphicsExportComponent ci, long *inputDepth );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    inputDepth

    Points to a variable to receive the input image depth.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns an image description describing the input image in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputImageDescription ( GraphicsExportComponent ci, ImageDescriptionHandle *desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    desc

    Points to a variable to receive a handle to an ImageDescription structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns an ImageDescription structure containing information such as the format of the compressed data, its bit depth, natural bounds, and resolution.

    Special Considerations

    The caller is responsible for disposing of the returned image description handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the dimensions of the input image in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputImageDimensions ( GraphicsExportComponent ci, Rect *dimensions );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dimensions

    Points to a rectangle to receive the dimensions of the input image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Gets the current value of the ColorSync profile for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetColorSyncProfile ( GraphicsExportComponent ci, Handle *colorSyncProfile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    colorSyncProfile

    Points to a variable to receive the ColorSync profile as a newly allocated handle.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    The caller is responsible for disposing of the returned handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the compression method for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetCompressionMethod ( GraphicsExportComponent ci, long *compressionMethod );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    compressionMethod

    Points to a value to receive the compression method.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the compression quality value for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetCompressionQuality ( GraphicsExportComponent ci, CodecQ *spatialQuality );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    spatialQuality

    Points to a variable to receive a quality constant (see below). See these constants:

    • codecMinQuality

    • codecLowQuality

    • codecNormalQuality

    • codecHighQuality

    • codecMaxQuality

    • codecLosslessQuality

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current depth setting for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetDepth ( GraphicsExportComponent ci, long *depth );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    depth

    Points to a variable to receive the depth.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • 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.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetDontRecompress ( GraphicsExportComponent ci, Boolean *dontRecompress );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dontRecompress

    Points to a Boolean to receive the recompression setting.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Even though it is not decompressed and recompressed, graphics data may be modified when it is copied through.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the interlace style in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInterlaceStyle ( GraphicsExportComponent ci, unsigned long *interlaceStyle );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    interlaceStyle

    Points to a variable to receive the interlace style. Valid values and interpretations are defined by individual exporters. In QuickTime 4, the PNG graphics exporter supports the interlaceStyle settings shown below See these constants:

    • kQTPNGInterlaceNone

    • kQTPNGInterlaceAdam7

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current user data setting in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetMetaData ( GraphicsExportComponent ci, void *userData );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    userData

    A pointer to a UserDataRecord structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Determines the resolution of a graphics exporter component.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetResolution ( GraphicsExportComponent ci, Fixed *horizontalResolution, Fixed *verticalResolution );

    Parameters

    ci

    A component instance. Your software obtains this reference from OpenComponent or OpenDefaultComponent.

    horizontalResolution

    Points to a variable to receive the horizontal resolution.

    verticalResolution

    Points to a variable to receive the vertical resolution.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current desired maximum data size for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetTargetDataSize ( GraphicsExportComponent ci, unsigned long *targetDataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    targetDataSize

    Points to a variable to receive the desired maximum data size in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the ColorSync profile to embed in the image file for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetColorSyncProfile ( GraphicsExportComponent ci, Handle colorSyncProfile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    colorSyncProfile

    A handle to the ColorSync profile.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    ColorSync profiles allow image files to describe their native colorspace in a self-contained manner. They can be stored in atoms of type 'iicc'.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the compression method to use in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetCompressionMethod ( GraphicsExportComponent ci, long compressionMethod );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    compressionMethod

    A value (see below) describing the compression algorithm to be used by the graphics exporter. See these constants:

    • kQTTIFFCompression_None

    • kQTTIFFCompression_PackBits

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    In QuickTime 4, the TIFF graphics exporter supports the compressionMethod settings kQTTIFFCompression_None and kQTTIFFCompression_PackBits. Some image formats, such as TIFF, support several compression methods.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the compression quality for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetCompressionQuality ( GraphicsExportComponent ci, CodecQ spatialQuality );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    spatialQuality

    A constant (see below) that defines the currently specified quality value. See these constants:

    • codecMinQuality

    • codecLowQuality

    • codecNormalQuality

    • codecHighQuality

    • codecMaxQuality

    • codecLosslessQuality

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This setting is only supported by lossy compression methods.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the depth to use in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetDepth ( GraphicsExportComponent ci, long depth );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    depth

    A value describing the depth of the image data. Some image file formats support more than one pixel depth.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The BMP, JPEG, Photoshop, PNG, PICT, QuickTime Image, TGA and TIFF graphics exporters support the depth setting. Some image file formats support more than one pixel depth.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Requests that the original compressed data for a graphics export operation not be decompressed and recompressed, but be copied through to the output file.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetDontRecompress ( GraphicsExportComponent ci, Boolean dontRecompress );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dontRecompress

    If TRUE, requests not to recompress the image data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Even though it is not decompressed and recompressed, graphics data may be modified when it is copied through.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the interlace style for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInterlaceStyle ( GraphicsExportComponent ci, unsigned long interlaceStyle );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    interlaceStyle

    The new interlace style to use. Valid values and interpretations are defined by individual exporters. In QuickTime 4, the PNG graphics exporter supports the interlaceStyle settings shown below. See these constants:

    • kQTPNGInterlaceNone

    • kQTPNGInterlaceAdam7

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    A common use for this function is in the PNG and GIF formats, which rearrange data so that low-resolution images can be displayed from incomplete data streams.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines supplemental data for a graphics export operation, such as copyright text.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetMetaData ( GraphicsExportComponent ci, void *userData );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    userData

    A pointer to user data. The value you pass should have the type userData, which is a pointer to a UserDataRecord.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    In QuickTime 4, none of the supplied graphics exporters support setting user data.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the resolution to store in the image file for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetResolution ( GraphicsExportComponent ci, Fixed horizontalResolution, Fixed verticalResolution );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    horizontalResolution

    A value describing the horizontal resolution of the image, where the upper byte is dots per inch. The value 0x00480000 represents 72.0 dpi.

    verticalResolution

    A value describing the vertical resolution of the image, where the upper byte is dots per inch. The value 0x00480000 represents 72.0 dpi.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines a desired maximum data size for a graphics export operation and asks for a quality that does not exceed that size.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetTargetDataSize ( GraphicsExportComponent ci, unsigned long targetDataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    targetDataSize

    A value that describes the maximum size of the image data in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Draws an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportDraw ( GraphicsImportComponent ci );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function draws the image currently in use by the graphics import component to the graphics port and device specified by GraphicsImportSetGWorld. GraphicsImportDraw takes into account all settings previously specified for the image, such as the source rectangle, transformation matrix, clipping region, graphics mode, and image quality.

    Special Considerations

    The base graphics importer's drawing function uses the results of GraphicsImportGetImageDescription and GraphicsImportGetDataOffsetAndSize to create a decompression sequence, which it uses to draw the image. Subsequent draw operations with the same connection may reuse the decompression sequence. Other graphics importers may override this behavior.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current graphics port and device for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetGWorld ( GraphicsImportComponent ci, CGrafPtr *port, GDHandle *gd );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    port

    Returns a pointer to the CGrafPort structure for the current destination graphics port. Set to NIL if you are not interested in this information.

    gd

    Returns a pointer to the GDevice structure for the destination graphics device. Set to NIL if you are not interested in this information.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns the graphics port and device that will be used to draw the image. The graphics world is initialized to the current port and device when the graphics importer component is opened.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the graphics port and device for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetGWorld ( GraphicsImportComponent ci, CGrafPtr port, GDHandle gd );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    port

    A pointer to the CGrafPort structure that defines the destination graphics port or graphics world. Set to NIL to use the current port.

    gd

    A handled to the GDevice structure that defines the destination graphics device. Set to NIL to use the current device. If the port parameter specifies a graphics world, set this parameter to NIL to use that graphics world's device.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The graphics world is initialized to the current port and device when the graphics importer component is opened. Use this function to select another port or device.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the suggested file name extension for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetDefaultFileNameExtension ( GraphicsExportComponent ci, OSType *fileNameExtension );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    fileNameExtension

    Points to a location to receive the file name extension.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    File name extensions are returned as upper-case big-endian four-character codes. For example, the extension .png would be returned as 'PNG ' (0x504E4720).

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the suggested file type and creator for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetDefaultFileTypeAndCreator ( GraphicsExportComponent ci, OSType *fileType, OSType *fileCreator );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    fileType

    Points to a location to receive the suggested file type for the image file format. If you don't need this information, pass NIL.

    fileCreator

    Points to a location to receive the suggested file creator for the new image file format. If you don't need this information, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function, along with GraphicsExportGetDefaultFileNameExtension and GraphicsExportGetMIMETypeList, returns information about the image format supported by a graphics exporter. Format-specific exporters must implement all three of these calls.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns MIME types and other information about the graphics format in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetMIMETypeList ( GraphicsExportComponent ci, void *qtAtomContainerPtr );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    qtAtomContainerPtr

    Receives a newly-created QuickTime atom container that contains information about the graphics format.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates and returns a QuickTime atom container that contains the format's name, as a string in an atom of type 'desc' (kMimeInfoDescriptionTag), and optionally the MIME type as a string in an atom of type 'mime'[atom] (kMimeInfoMimeTypeTag).

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current progress function for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetProgressProc ( GraphicsExportComponent ci, ICMProgressProcRecordPtr progressProc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    progressProc

    A pointer to an ICMProgressProc callback.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    By default, graphics export components have no progress functions.

    Special Considerations

    This function is always implemented by the base graphics exporter.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Installs a progress function in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetProgressProc ( GraphicsExportComponent ci, ICMProgressProcRecordPtr progressProc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    progressProc

    Points to an ICMProgressProc callback. If you pass a value of -1, QuickTime provides a standard progress function. If you want to remove the existing progress function, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is always implemented by the base graphics exporter.

    Special Considerations

    If your progress function does any drawing, you should take care to set a safe graphics state before doing so, and to restore the graphics state afterwards. In particular, the current graphics device may be an offscreen device.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Asks whether the graphics importer expects to draw every pixel.

    Declaration

    Objective-C

    ComponentResult GraphicsImportDoesDrawAllPixels ( GraphicsImportComponent ci, short *drawsAllPixels );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    drawsAllPixels

    A pointer to a value (see below) that describes the predicted drawing behavior. See these constants:

    • graphicsImporterDrawsAllPixels

    • graphicsImporterDoesntDrawAllPixels

    • graphicsImporterDontKnowIfDrawAllPixels

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Some image file formats permit non-rectangular images or images with transparent regions. When such an image is drawn, not every pixel in the boundary rectangle will be changed. GraphicsImportDoesDrawAllPixels lets you try to find out whether this will be the case. For instance, you might choose to erase the area behind the image before drawing. If the graphics import component supports this function, drawsAllPixels will contain one of the constants shown above on return.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns image description information for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetImageDescription ( GraphicsImportComponent ci, ImageDescriptionHandle *desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    desc

    Points to a handle to an ImageDescription structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns an ImageDescription structure containing information such as the format of the compressed data, its bit depth, natural bounds, and resolution.

    Special Considerations

    The caller is responsible for disposing of the returned image description handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Extracts user data from an imported image file.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetMetaData ( GraphicsImportComponent ci, void *userData );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    userData

    A pointer to a UserDataRecord structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You may create a new user data structure by calling NewUserData. Alternatively, you can obtain a pointer to an existing one by calling GetMovieUserData, GetTrackUserData or GetMediaUserData. If the user data passed to GraphicsImportGetMetaData belongs to a movie, track or media, then whatever user data is extracted will be added to that movie, track or media.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the bounding rectangle of an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetNaturalBounds ( GraphicsImportComponent ci, Rect *naturalBounds );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    naturalBounds

    A pointer to a Rect structure that describes the size of the bounding rectangle for the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Use this function to determine the native size of the image associated with a graphics importer component. The natural bounds are always zero-based. This is a convenience function that simply calls GraphicsImportGetImageDescription and extracts the width and height fields.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Validates image data for a data reference to an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportValidate ( GraphicsImportComponent ci, Boolean *valid );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    valid

    Pointer to a Boolean value. On return, this parameter is set to TRUE if the the graphics importer component can draw the data reference. If the graphics importer component cannot draw the data reference, this parameter is set to FALSE.

    Return Value

    See Error Codes. Returns noErr if there is no error. Not all graphics importer components implement this function. A component that does not implement the function will return the badComponentSelector result code. This does not indicate that the file is valid or invalid.

    Discussion

    This function allows a graphics importer component to determine if its current data reference contains valid image data. For example, a JFIF graphics importer component might check for the presence of a JFIF marker at the start of the data stream. This function is provided for applications to use to determine what type of image data a particular file may contain. Sometimes a file may not have the correct file type or file extension. In this case, the application will not know which graphics importer component to use. By iterating through all graphics importer components and calling GraphicsImportValidate for each one, it may be possible to locate a graphics importer component that can draw the specified file.

    Special Considerations

    GraphicsImportValidate does not perform an exhaustive check on the file. It is possible for GraphicsImportValidate to claim a data reference is valid but for GraphicsImportDraw to return an error due to bad data. Format-specific importers that implement the GraphicsImportValidate call should have the canMovieImportValidateFile bit set in the flags field of their ComponentDescription structures.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns a list of MIME types supported by the graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetMIMETypeList ( GraphicsImportComponent ci, void *qtAtomContainerPtr );

    Parameters

    ci

    Specifies an instance of a graphics importer component.

    qtAtomContainerPtr

    A pointer to an atom container that holds a series of atom triplets for each MIME type, including an atom of type 'mime'[atom] that contains a list of MIME types supported by the graphics import component.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Your graphics import component can support MIME types that correspond to graphics formats it supports. To make a list of these MIME types available to applications or other software, it must implement GraphicsImportGetMIMETypeList. To indicate that your graphics import component supports this function, set the hasMovieImportMIMEList flag in the componentFlags field of your component's ComponentDescription structure.

    Special Considerations

    This function does not access any file-specific information.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Asks whether the current graphics export operation should be performed by transcoding.

    Declaration

    Objective-C

    ComponentResult GraphicsExportCanTranscode ( GraphicsExportComponent ci, Boolean *canTranscode );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    canTranscode

    Points to a Boolean to receive the answer. TRUE means that the current export operation should be performed by transcoding, FALSE that it should not.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Graphics exporters may be able to transcode from some inputs and not from others. For instance, the JPEG graphics exporter is able to transcode compressed JPEG streams, but not other kinds of compressed data. The base graphics exporter makes this call to the format-specific graphics exporter to ask whether the current export operation should be done by transcoding. If the format-specific exporter replies that it should, the base exporter calls GraphicsExportDoTranscode to do so. If the answer is no, then the format-specific exporter will not be able to transcode.

    Special Considerations

    This function is used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call it. Format-specific exporters may delegate this call, in which case the base graphics exporter's implementation gives a reply of FALSE.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Asks whether to use a compressor in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportCanUseCompressor ( GraphicsExportComponent ci, Boolean *canUseCompressor, void *codecSettingsAtomContainerPtr );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    canUseCompressor

    A Boolean variable to receive the answer.

    codecSettingsAtomContainerPtr

    A pointer to a QTAtomContainer variable. If the canUseCompressor parameter returns TRUE, the format-specific exporter should create a new QuickTime atom container with information about the compression operation and return it here.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The base graphics exporter makes this call of the format-specific graphics exporter to ask whether the current export operation should be done by using an image compressor. If the answer is TRUE, the format-specific exporter must also create and return an atom container. This atom container must contain a big-endian 'vide' atom with at least a child atom of type 'sptl' containing a SCSpatialSettings record specifying which compressor to use, the depth, and the spatial quality.

    Special Considerations

    This function is used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call it. Format-specific exporters may delegate this call, in which case the base graphics exporter's implementation gives a reply of FALSE.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Performs a standalone graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportDoStandaloneExport ( GraphicsExportComponent ci );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    If both GraphicsExportCanTranscode and GraphicsExportCanUseCompressor reply FALSE, the base graphics exporter makes this call of the format-specific exporter to perform the export.

    Special Considerations

    This function is used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call it.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Performs a graphics export operation by transcoding.

    Declaration

    Objective-C

    ComponentResult GraphicsExportDoTranscode ( GraphicsExportComponent ci );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The base graphics exporter makes this call of the format-specific graphics exporter to perform a transcoding export. This function should call GraphicsExportGetInputDataSize and GraphicsExportReadInputData to measure and read the input image data, and GraphicsExportWriteOutputData to write the output image file.

    Special Considerations

    This function is used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call it.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Performs a graphics export operation with compression.

    Declaration

    Objective-C

    ComponentResult GraphicsExportDoUseCompressor ( GraphicsExportComponent ci, void *codecSettingsAtomContainer, ImageDescriptionHandle *outDesc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    codecSettingsAtomContainer

    An atom container returned by GraphicsExportCanUseCompressor.

    outDesc

    Points to an image description handle to receive an ImageDescription structure describing the compressed image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The base graphics exporter makes this call to perform a compressing export.

    Special Considerations

    This function is used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call it. Format-specific exporters will normally delegate this call, unless they implement export to a container format like PICT or QuickTime Image. In that case, they will wrap the base exporter's implementation in one that forms the container about the compressed data.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns a ColorSync profile for an imported image, if one is embedded in the image file.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetColorSyncProfile ( GraphicsImportComponent ci, Handle *profile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    profile

    A pointer to receive a handle containing a ColorSync profile, or NIL if the image file does not contain one.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Some graphics importers don't implement this function. The caller is responsible for disposing of the returned handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the offset and size of the compressed image data within an imported image file.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataOffsetAndSize ( GraphicsImportComponent ci, unsigned long *offset, unsigned long *size );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    A pointer to a value describing the byte offset of the image data from the beginning of the data source.

    size

    A pointer to a value describing the size of the image data in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns the offset and size of the actual image data within the data source. By default, the offset returned is 0 and the size returned is the size of the file. However, some graphics import components will override this function to skip over unneeded information at the beginning or end of the file.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Provides a 64-bit version of GraphicsImportGetDataOffsetAndSize.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataOffsetAndSize64 ( GraphicsImportComponent ci, wide *offset, wide *size );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    A pointer to a value describing the byte offset of the image data.

    size

    A pointer to the size of the data, in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Format-specific importers may delegate this function, in which case the base importer's implementation will call the 32-bit equivalent, GraphicsImportGetDataOffsetAndSize. If neither function is implemented by the format-specific importer, then both functions will return an offset of 0 and the full size of the data reference, taking into account any data reference offset and limit.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the data reference starting offset and data size limit for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit ( GraphicsImportComponent ci, unsigned long *offset, unsigned long *limit );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    A pointer to a value specifying the byte offset of the image data from the beginning of the data reference.

    limit

    The offset of the byte following the last byte of the image data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns the values set by the GraphicsImportSetDataReferenceOffsetAndLimit function. By default, the offset is 0 and the limit is MaxInt (2^32 - 1).

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportGetDataReferenceOffsetAndLimit, these functions include GraphicsImportSetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataFile, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReference. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Provides a 64-bit version of GraphicsImportGetDataReferenceOffsetAndLimit.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataReferenceOffsetAndLimit64 ( GraphicsImportComponent ci, wide *offset, wide *limit );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    A pointer to receive a value specifying the offset of the byte data following the last byte of the image data.

    limit

    A pointer to the data limit.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The only difference between this function and GraphicsImportGetDataReferenceOffsetAndLimit is that the offset parameter and the limit parameter are 64-bit integers instead of 32-bit integers.

    Special Considerations

    New applications should use this function instead of the 32-bit version.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the default clipping region for an imported image, if one is stored there.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDefaultClip ( GraphicsImportComponent ci, RgnHandle *defaultRgn );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    defaultRgn

    A pointer to a handle to a MacRegion structure to receive the default clipping region.

    Return Value

    See Error Codes. Returns noErr if there is no error. Returns badComponentSelector if there is no clipping region.

    Special Considerations

    Most graphics importers don't implement this function. The caller is responsible for disposing of the returned region.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the default graphics mode for an imported image, if one is stored there.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDefaultGraphicsMode ( GraphicsImportComponent ci, long *defaultGraphicsMode, RGBColor *defaultOpColor );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    defaultGraphicsMode

    A pointer to receive the graphics mode; see Graphics Transfer Modes.

    defaultOpColor

    A pointer to receive a color; see Color Constants.

    Return Value

    See Error Codes. Returns noErr if there is no error. If this function returns badComponentSelector, you should assume a mode of ditherCopy.

    Special Considerations

    Most graphics importers don't implement this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the default matrix for an imported image, if one is stored there.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDefaultMatrix ( GraphicsImportComponent ci, MatrixRecord *defaultMatrix );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    defaultMatrix

    Receives a matrix record.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    If this function returns badComponentSelector, you should assume an identity matrix.

    Special Considerations

    Most graphics importers don't implement this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the default source rectangle for an imported image, if one is stored there.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDefaultSourceRect ( GraphicsImportComponent ci, Rect *defaultSourceRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    defaultSourceRect

    Pointer to receive a Rect structure that describes the default source rectangle.

    Return Value

    See Error Codes. Returns noErr if there is no error. If this function returns badComponentSelector, the source rectangle is equal to the image's natural bounds.

    Special Considerations

    Most graphics importers don't implement this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the destination rectangle for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDestRect ( GraphicsImportComponent ci, Rect *destRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    destRect

    A pointer to receive a Rect structure that describes the destination rectangle.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    If the source rectangle is equal to the natural bounds, this function is equivalent to GraphicsImportGetBoundsRect.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current flags of a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetFlags ( GraphicsImportComponent ci, long *flags );

    Parameters

    ci

    The component instance that identifies your connection to a graphics importer component.

    flags

    Pointer to a long integer to receive the current flags (see below). See these constants:

    • kGraphicsImporterDontDoGammaCorrection

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the number of images in an imported image file.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetImageCount ( GraphicsImportComponent ci, unsigned long *imageCount );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    imageCount

    Points to a variable to receive the number of images.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Most image file formats don't support multiple images. Of the image formats supported by QuickTime 4, however, TIFF files can support multiple images, Photoshop files can contain multiple layers and FlashPix files can contain multiple resolutions. The base graphics importer returns a count of 1.

    Special Considerations

    Format-specific importers for multiple-image formats should override this function; other importers should delegate it.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current image index for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetImageIndex ( GraphicsImportComponent ci, unsigned long *imageIndex );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    imageIndex

    Points to a variable to receive the image index. Image indexes are one-based; 0 is considered a special index by some importers, and treated the same as 1 by others. The default image index is 1.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The base graphics importer implements this function. Format-specific importers should delegate it.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Reads imported image data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportReadData ( GraphicsImportComponent ci, void *dataPtr, unsigned long dataOffset, unsigned long dataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataPtr

    A pointer to a memory block to receive the data.

    dataOffset

    The offset of the image data within the data reference. The function begins reading image data from this offset.

    dataSize

    The number of bytes of image data to read.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function communicates with the appropriate data handler to retrieve image data. Typically, only developers of graphics importer components will need to use this function. This function should always be used to retrieve data from the data source, rather than reading the data directly. This function automatically honors any offset and limit values set with GraphicsImportSetDataReferenceOffsetAndLimit. For instance, if the offset is set to 100 and GraphicsImportReadData is called to read bytes from dataOffset 5, it will return bytes starting at actual offset 105.

    Special Considerations

    This function is used by format-specific graphics import components to read data from the data source. It is implemented by the base graphics importer.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Provides a 64-bit version of GraphicsImportReadData.

    Declaration

    Objective-C

    ComponentResult GraphicsImportReadData64 ( GraphicsImportComponent ci, void *dataPtr, const wide *dataOffset, unsigned long dataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataPtr

    A pointer to a memory block to receive the data.

    dataOffset

    A pointer to the offset of the image data within the data reference.

    dataSize

    The number of bytes of image data to read.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is a 64-bit analog of GraphicsImportReadData. Format-specific importers may call either version.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the data reference starting offset and data size limit for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit ( GraphicsImportComponent ci, unsigned long offset, unsigned long limit );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    The byte offset of the image data from the beginning of the data reference.

    limit

    A pointer to a value specifying the offset of the byte following the last byte of the image data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    A data reference typically refers to an entire file. However, there are times when the data being referenced is embedded in a larger file. In these cases, it is necessary to indicate where the data begins in the data reference and where it ends. This function lets you specify the starting offset and ending offset. All requests to read data are then relative to the specified offset, and are pinned to the data size, so the graphics import component cannot accidentally read outside the end (or beginning) of the segment.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportSetDataReferenceOffsetAndLimit, these functions include GraphicsImportGetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataHandle, GraphicsImportSetDataReference, GraphicsImportSetDataFile, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Provides a 64-bit version of GraphicsImportSetDataReferenceOffsetAndLimit.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDataReferenceOffsetAndLimit64 ( GraphicsImportComponent ci, const wide *offset, const wide *limit );

    Parameters

    ci

    A component instance. Your software obtains this reference from OpenComponent or OpenDefaultComponent.

    offset

    A pointer to a value specifying the byte offset of the image data from the beginning of the data source.

    limit

    A pointer to a value specifying the offset of the byte following the last byte of the image data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is a 64-bit analog of GraphicsImportSetDataReferenceOffsetAndLimit.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the destination rectangle for a graphics import operation.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDestRect ( GraphicsImportComponent ci, const Rect *destRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    destRect

    Points to a Rect structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Use this function to define the rectangle into which the extracted source rectangle should be drawn. This function creates a transformation matrix to map the source rectangle to the specified destination rectangle and then calls the GraphicsImportSetMatrix function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the flags for a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetFlags ( GraphicsImportComponent ci, long flags );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    flags

    The new flags (see below) to use. See these constants:

    • kGraphicsImporterDontDoGammaCorrection

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the image index for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetImageIndex ( GraphicsImportComponent ci, unsigned long imageIndex );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    imageIndex

    The image index. Image indexes are one-based; 0 is considered a special index by some importers, and treated the same as 1 by others. The default image index is 1.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The base graphics importer ensures that the image index is no greater than the image count returned by GraphicsImportGetImageCount.

    Special Considerations

    The base graphics importer implements this function. Format-specific importers should delegate it.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Looks for a graphics subimage that contains a thumbnail.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetImageIndexToThumbnail ( GraphicsImportComponent ci );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    Return Value

    See Error Codes. If the function does not find a thumbnail, it returns noThumbnailFoundErr. It returns noErr if there is no error.

    Discussion

    This function looks for a subimage that contains a thumbnail. If the function finds one, it sets the image index to that subimage. The base graphics importer's implementation of SetImageIndexToThumbnail works by looking for the first image index that returns a kQTIndexedImageType metadata item containing the kQTIndexedImageIsThumbnail tag. Format-specific graphics importers may override this process with more efficient algorithms.

    Import Statement

    Availability

    Available in OS X v10.2 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the current settings from a graphics exporter component.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetSettingsAsAtomContainer ( GraphicsExportComponent ci, void *qtAtomContainerPtr );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    qtAtomContainerPtr

    Points to a variable to receive a new QuickTime atom container containing the current graphics exporter component settings.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    The caller is responsible for disposing of the returned atom container.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the current settings from the graphics export component in a user-readable format.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetSettingsAsText ( GraphicsExportComponent ci, Handle *theText );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    theText

    Points to a variable to receive a newly-allocated handle containing text.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    The caller is responsible for disposing of the returned handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Displays a dialog for the user to configure graphics exporter settings, if applicable.

    Declaration

    Objective-C

    ComponentResult GraphicsExportRequestSettings ( GraphicsExportComponent ci, ModalFilterYDUPP filterProc, void *yourDataProc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    filterProc

    A ModalFilterYDProc callback. If you don't need one, pass NIL.

    yourDataProc

    An extra parameter that will be passed to the ModalFilterProc callback when it is called. If you don't need one, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Some graphics exporters don't support settings dialogs, and so don't implement this call. To find out whether a graphics exporter implements this call, you can use this code:

    • CallComponentCanDo( myGraphicsExporter,
    • kGraphicsExportRequestSettingsSelect);

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the graphics exporter component's current configuration to match the settings in a passed atom container.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetSettingsFromAtomContainer ( GraphicsExportComponent ci, void *qtAtomContainer );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    qtAtomContainer

    A pointer to a QuickTime atom container that contains settings.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The settings atom container may contain atoms other than those expected by the graphics exporter component or may be missing certain atoms. This function will use only the settings it understands.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the number of bytes of original image data that can be read in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputDataSize ( GraphicsExportComponent ci, unsigned long *size );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    size

    Points to a variable to receive the size in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is used by format-specific graphics exporters when transcoding. Applications will not normally need to call this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Asks whether the image source for a graphics export operation is in a form that the exporter can read.

    Declaration

    Objective-C

    ComponentResult GraphicsExportMayExporterReadInputData ( GraphicsExportComponent ci, Boolean *mayReadInputData );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    mayReadInputData

    Points to a Boolean; TRUE means that the image source is in a form that the exporter can read, FALSE means it is not.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Some kinds of image source, such as files and handles, form a stream of bytes that can be read directly. Others, such as pictures and pixmaps, do not. Format-specific graphics exporters usually cannot transcode if they cannot read the original data, so those exporters which implement GraphicsExportCanTranscode will usually first call GraphicsExportMayExporterReadInputData.

    Special Considerations

    This function is used by format-specific graphics exporters when transcoding. Applications will not normally need to call this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Reads the original image data in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportReadInputData ( GraphicsExportComponent ci, void *dataPtr, unsigned long dataOffset, unsigned long dataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataPtr

    A pointer to a memory block to receive the data.

    dataOffset

    The offset of the image data within the source image data. The function begins reading image data from this offset.

    dataSize

    The number of bytes of image data to read.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function communicates with the appropriate data handler to retrieve image data.

    Special Considerations

    This function is used by format-specific graphics exporters when transcoding. Applications will not normally need to call this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the current input offset and limit in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputOffsetAndLimit ( GraphicsExportComponent ci, unsigned long *offset, unsigned long *limit );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    offset

    Points to a variable to receive the offset. If you don't need this information, pass NIL.

    limit

    Points to a variable to receive the limit. If you don't need this information, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is only applicable when the input is a data reference, file, handle or pointer.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the portion of an input data reference, file, handle or pointer that a graphics exporter is permitted to read.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputOffsetAndLimit ( GraphicsExportComponent ci, unsigned long offset, unsigned long limit );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    offset

    The byte offset of the input image data from the beginning of the data reference.

    limit

    The offset of the byte following the last byte of the input image data. (If you don't need to apply any limit, pass (unsigned long)-1.) Both the offset parameter and the limit parameter values are relative to the start of the compressed data. GraphicsExportGetInputDataSize and GraphicsExportReadInputData take the offset and limit values into account automatically.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This routine would be useful if, for example, the source was a JPEG image embedded within a larger file.

    Special Considerations

    This function is only applicable when the input is a data reference, file, handle, or pointer.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Presents a dialog box letting the user save an imported image in a foreign file format.

    Declaration

    Objective-C

    ComponentResult GraphicsImportDoExportImageFileDialog ( GraphicsImportComponent ci, const FSSpec *inDefaultSpec, StringPtr prompt, ModalFilterYDUPP filterProc, OSType *outExportedType, FSSpec *outExportedSpec, ScriptCode *outScriptTag );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    inDefaultSpec

    A pointer to an FSSpec that suggests a default name for the file. If you don't want to suggest a default name, pass NIL.

    prompt

    A pointer to a prompt string that appears in the standard put dialog box; it may be NIL, in which case a default string is used.

    filterProc

    A modal filter function to be passed to the Mac OS function CustomPutFile; see Inside Macintosh: Files for more information. If you don't need to filter events, pass NIL.

    outExportedType

    A pointer to a variable that will receive the type of the export file that was chosen by the user. If you don't want this information, pass NIL. See File Types and Creators.

    outExportedSpec

    A pointer to a variable that will receive the FSSpec of the file that was written. If you don't want this information, pass NIL.

    outScriptTag

    A pointer to a variable that will receive the script system in which the exported file name is to be displayed. See Localization Codes. If you don't want this information, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function presents the user with an extended Standard File dialog box that allows the image currently in use by the graphics import component to be exported to a file, in a format of the user's choice.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Saves an imported image in a foreign file format.

    Declaration

    Objective-C

    ComponentResult GraphicsImportExportImageFile ( GraphicsImportComponent ci, OSType fileType, OSType fileCreator, const FSSpec *fss, ScriptCode scriptTag );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    fileType

    The file type for the new image file, such as 'JPEG'. See File Types and Creators.

    fileCreator

    The file creator for the new image file. See File Types and Creators. You may pass 0, in which case a default file creator for this file type is used.

    fss

    A pointer to the FSSpec structure that identifies the file that is to receive the exported image.

    scriptTag

    The script system in which the file name is to be displayed; see Localization Codes. If you have established the name and location of the file using one of the Standard File Package functions, use the script code returned in the reply record (reply.sfScript). Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript. See Inside Macintosh: Files for more information about script specifications.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates a new file containing the image currently in use by the graphics import component. The new file is compressed in a format corresponding to the provided file type. If a non-identity matrix has been applied to the graphics import component, this matrix is applied to the image before export. Since most image formats don't support nonzero top-left coordinates, the matrix is temporarily adjusted to ensure that the exported image's bounds have top-left coordinates at (0,0). If the matrix does not map the graphics import component's source rectangle to a rectangle, there will be extra white space left around the image.

    Special Considerations

    Graphics import components can save data in several formats, including QuickDraw pictures and QuickTime Image files. This capability is only needed by applications that perform file format translation. Applications that only wish to draw the image can use GraphicsImportDraw.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Creates a QuickDraw picture handle to an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetAsPicture ( GraphicsImportComponent ci, PicHandle *picture );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    picture

    Points to a handle to a Picture structure that is to receive the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates a new QuickDraw picture handle containing the image currently in use by the graphics import component. If possible, the image will remain in the compressed format. For example, if the image is from a JFIF file, the picture will contain compressed JPEG data. It is the responsibility of the caller to dispose of the picture handle.

    Special Considerations

    Graphics import components can save data in several formats, including QuickDraw pictures and QuickTime Image files. This capability is only needed by applications that perform file format translation. Applications that only wish to draw the image can use GraphicsImportDraw.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns information about available export formats for a graphics importer.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetExportImageTypeList ( GraphicsImportComponent ci, void *qtAtomContainerPtr );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    qtAtomContainerPtr

    A pointer to a QuickTime atom container that is to receive the type list.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates and returns a QuickTime atom container of type 'expo' containing information about the file types that can be exported by the graphics import component. For each file type, the atom container contains the following child atoms: 'ftyp', the exported file type; 'mime'[atom], the MIME type for this format (optional); 'ext ', the suggested file extension for this format; and 'desc', a human-readable name for this format. The 'ftyp' atom contains an OSType; the other atoms contain nonterminated strings.

    Special Considerations

    It is the responsibility of the caller to dispose of the 'expo' atom container.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves settings for image files exported by the graphics importer.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetExportSettingsAsAtomContainer ( GraphicsImportComponent ci, void *qtAtomContainerPtr );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    qtAtomContainerPtr

    A pointer to a QuickTime atom container that is to receive the settings information.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates and returns a new QuickTime atom container which holds information about how images will be saved by GraphicsImportExportImageFile.

    Special Considerations

    It is the responsibility of the caller to dispose of this atom container.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Creates a QuickDraw picture file for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSaveAsPicture ( GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    fss

    A pointer to an FSSpec structure that defines the file to receive the image.

    scriptTag

    The script system in which the file name is to be displayed; see Localization Codes. If you have established the name and location of the file using one of the Standard File Package functions, use the script code returned in the reply record (reply.sfScript). Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript. See Inside Macintosh: Files for more information about script specifications.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates a new QuickDraw picture file containing the image currently in use by the graphics import component. If possible, the image will remain in the compressed format. For example, if the image is from a JFIF file, the picture will contain compressed JPEG data. Applications that only wish to draw the image can use GraphicsImportDraw.

    Special Considerations

    Graphics import components can save data in several formats, including QuickDraw pictures and QuickTime Image files. This capability is only needed by applications that perform file format translation.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Creates a QuickTime Image file of an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSaveAsQuickTimeImageFile ( GraphicsImportComponent ci, const FSSpec *fss, ScriptCode scriptTag );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    fss

    A pointer to the FSSpec that defines the file to receive the image.

    scriptTag

    The script system in which the file name is to be displayed; see Localization Codes. If you have established the name and location of the file using one of the Standard File Package functions, use the script code returned in the reply record (reply.sfScript). Otherwise, specify the system script by setting the scriptTag parameter to the value smSystemScript. See Inside Macintosh: Files for more information about script specifications.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function creates a new QuickTime Image file containing the image currently in use by the graphics import component. If possible, the image remains in the compressed format. For example, if the image is from a JFIF file, the QuickTime Image file will contain compressed JPEG data.

    Special Considerations

    Graphics import components can save data in several formats, including QuickDraw pictures and QuickTime Image files. This capability is only needed by applications that perform file format translation. Applications that only wish to draw the image can use the GraphicsImportDraw function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Determines settings for the export of imported image files.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetExportSettingsFromAtomContainer ( GraphicsImportComponent ci, void *qtAtomContainer );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    qtAtomContainer

    A pointer to a QuickTime atom container that holds new settings information.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function extracts export settings from a QuickTime atom container. These settings configure how images will be saved by GraphicsImportExportImageFile.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the bounding rectangle for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetBoundsRect ( GraphicsImportComponent ci, Rect *bounds );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    bounds

    A pointer to a Rect structure describing the bounding rectangle that has been defined for the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This is a convenience function. It is implemented by calling GraphicsImportGetMatrix and GraphicsImportGetNaturalBounds and using the results to calculate the drawing rectangle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current clipping region for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetClip ( GraphicsImportComponent ci, RgnHandle *clipRgn );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    clipRgn

    A handle to the MacRegion structure that has been defined as the clipping region for the image. Returns NIL if there is no clipping region.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The caller must dispose of the returned region handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the graphics transfer mode for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetGraphicsMode ( GraphicsImportComponent ci, long *graphicsMode, RGBColor *opColor );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    graphicsMode

    A pointer to a long integer; see Graphics Transfer Modes. The function returns the QuickDraw graphics transfer mode setting for the image. Set to NIL if you are not interested in this information.

    opColor

    A pointer to an RGBColor structure. The function returns the color currently specified for blend and transparent operations. Set to NIL if you are not interested in this information.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Use this function to find out the current graphics transfer mode and color to use for blending and transparent operations. The default graphics mode is ditherCopy and the default opColor is 50% gray.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the transformation matrix to be used for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetMatrix ( GraphicsImportComponent ci, MatrixRecord *matrix );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    matrix

    A pointer to a MatrixRecord structure that defines the transformation matrix that applies to the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The transformation matrix is initialized to the identity matrix when the graphics import component is instantiated.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current progress function for a graphics import operation.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetProgressProc ( GraphicsImportComponent ci, ICMProgressProcRecordPtr progressProc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    progressProc

    A pointer to an ICMProgressProc callback.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    By default, graphics import components have no progress functions.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the image quality value for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetQuality ( GraphicsImportComponent ci, CodecQ *quality );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    quality

    A pointer to a constant (see below) that defines the currently specified quality value. See these constants:

    • codecMinQuality

    • codecLowQuality

    • codecNormalQuality

    • codecHighQuality

    • codecMaxQuality

    • codecLosslessQuality

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The quality value indicates how precisely the decompressor will decompress the image data. Some decompressors may choose to ignore some image data to improve decompression speed.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current source rectangle for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetSourceRect ( GraphicsImportComponent ci, Rect *sourceRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    sourceRect

    A pointer to a Rect structure that defines the source rectangle currently specified for the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function returns the current source rectangle, as specified by GraphicsImportSetSourceRect. The default source rectangle is the image's natural bounds.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the rectangle in which to draw an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetBoundsRect ( GraphicsImportComponent ci, const Rect *bounds );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    bounds

    A pointer to a Rect structure that describes the bounding rectangle into which the image will be drawn.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You use this function to define the rectangle into which the graphics image should be drawn. The function creates a transformation matrix to map the image's natural bounds to the specified bounds and then calls GraphicsImportSetMatrix.

    Special Considerations

    Because this function affects the transformation matrix, you should use GraphicsImportSetMatrix instead of this function if you also need to specify more complex transformations of the matrix.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the clipping region for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetClip ( GraphicsImportComponent ci, RgnHandle clipRgn );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    clipRgn

    A handle to a MacRegion structure that defines the clipping region in the destination coordinate system. Set to NIL to disable clipping. The graphics import component makes a copy of this region.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Because all drawing operations ignore the port clipping region, you must use this function to clip an image. The graphics importer component draws only that portion of the image that lies within the specified clipping region.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the graphics transfer mode for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetGraphicsMode ( GraphicsImportComponent ci, long graphicsMode, const RGBColor *opColor );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    graphicsMode

    The graphics transfer mode to use for drawing the image; see Graphics Transfer Modes.

    opColor

    A pointer to an RGBColor structure that describes the color to use for blending and transparent operations.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Use this function to specify the graphics transfer mode and color to use for blending and transparent operations.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the transformation matrix to use for drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetMatrix ( GraphicsImportComponent ci, const MatrixRecord *matrix );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    matrix

    A pointer to a matrix structure that specifies how to transform the image during decompression. For example, you can use a transformation matrix to scale or rotate the image. To set the matrix to identity, pass NIL in this parameter.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function establishes the transformation matrix to be applied to an image, which determines where and how it will be drawn.

    Special Considerations

    This function affects the bounding rectangle defined for the image. You can specify where an image will be drawn by setting either a transformation matrix or a bounding rectangle, but it is usually more convenient for applications to set a bounding rectangle using the GraphicsImportSetBoundsRect function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Installs a progress procedure to call while drawing an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetProgressProc ( GraphicsImportComponent ci, ICMProgressProcRecordPtr progressProc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    progressProc

    Points to an ICMProgressProc callback. If you pass a value of -1, QuickTime provides a standard progress function. If you want to remove the existing progress function, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function sets a progress function that will be installed in the image decompression sequence used to draw the image.

    Special Considerations

    If your progress function does any drawing, you should take care to set a safe graphics state before doing so, and to restore the graphics state afterwards. In particular, the current graphics device may be an offscreen device.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the image quality value for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetQuality ( GraphicsImportComponent ci, CodecQ quality );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    quality

    Contains a constant (see below) that defines the desired image quality for decompression. Values for this parameter are on the same scale as compression quality. See these constants:

    • codecMinQuality

    • codecLowQuality

    • codecNormalQuality

    • codecHighQuality

    • codecMaxQuality

    • codecLosslessQuality

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The quality parameter controls how precisely the decompressor decompresses the image data. Some decompressors may choose to ignore some image data to improve decompression speed.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the source rectangle to use for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetSourceRect ( GraphicsImportComponent ci, const Rect *sourceRect );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    sourceRect

    A pointer to a Rect structure defining the portion of the image to decompress. This rectangle must lie within the boundary rectangle of the source image. Set to NIL to use the entire image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function provides a way to use only a portion of the source image.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the file containing the graphics data for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataFile ( GraphicsImportComponent ci, FSSpec *theFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    theFile

    A pointer in which to return the FSSpec structure of the file containing the graphics data.

    Return Value

    See Error Codes. Returns noErr if there is no error. If the data source is not a file, the function returns paramErr.

    Discussion

    Use this function to get the file system specification record for the file where the imported graphics data resides.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportGetDataFile, these functions include GraphicsImportSetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataHandle, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns a handle to imported graphics data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataHandle ( GraphicsImportComponent ci, Handle *h );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    h

    A pointer in which to return a handle to the graphics data.

    Return Value

    See Error Codes. Returns noErr if there is no error. If the data source is not a handle, the function returns paramErr.

    Discussion

    You use this function to get the handle that the graphics data resides in. The handle belongs to the component instance. You shouldn't dispose of it.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportGetDataHandle, these functions include GraphicsImportSetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataFile, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns a data reference to imported graphics data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDataReference ( GraphicsImportComponent ci, Handle *dataRef, OSType *dataReType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataRef

    A pointer in which to return a QuickTime data reference. If you don't want this information, pass NIL.

    dataReType

    A pointer to receive the type of the data reference; see Data References. If you don't want this information, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You use this function to get the data reference that the graphics data resides in. The GraphicsImportGetDataHandle and GraphicsImportGetDataFile functions call GraphicsImportGetDataReference and then manipulate the result accordingly. The caller should dispose of the returned dataRef.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportGetDataReference, these functions include GraphicsImportSetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataFile, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the file that contains imported graphics data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDataFile ( GraphicsImportComponent ci, const FSSpec *theFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    theFile

    A pointer to an FSSpec structure that defines the file containing the graphics data. The returned file will be opened for read access.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportSetDataFile, these functions include GraphicsImportGetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataHandle, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the handle that references imported graphics data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDataHandle ( GraphicsImportComponent ci, Handle h );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    h

    Specifies a handle containing graphics data. The format of the data in the handle is the same as that found in a file.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The graphics importer component doesn't make a copy of this data. Therefore, you must not dispose this handle until the graphics importer has been closed.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportSetDataHandle, these functions include GraphicsImportGetDataFile, GraphicsImportSetDataFile, GraphicsImportGetDataHandle, GraphicsImportSetDataReference, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the data reference for imported graphics data.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDataReference ( GraphicsImportComponent ci, Handle dataRef, OSType dataReType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataRef

    A handle to a QuickTime data reference.

    dataReType

    The data reference type. See Data References.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Applications typically don't use this function. The GraphicsImportSetDataFile and GraphicsImportSetDataHandle functions both call this function, with the appropriate data reference and data reference type. This function makes a copy of the passed data reference, so it is safe to dispose of the handle immediately after the call.

    Special Considerations

    Graphics importer components use QuickTime data handler components to obtain their data. Applications, however, will use graphics importer functions rather than directly calling a data handler. Besides GraphicsImportSetDataReference, these functions include GraphicsImportGetDataFile, GraphicsImportSetDataHandle, GraphicsImportGetDataHandle, GraphicsImportSetDataFile, GraphicsImportSetDataReferenceOffsetAndLimit, and GraphicsImportGetDataReferenceOffsetAndLimit. These functions allow the data source to be a file, a handle, or a QuickTime data reference. You only need to use these functions if you open the graphics importer component directly. You don't need to call them if you use one of the GetGraphicsImporter... functions such as GetGraphicsImporterForDataRef. The GetGraphicsImporter... functions automatically open the graphics importer component and set its data source.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Gets the output data reference handle in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputDataReference ( GraphicsExportComponent ci, Handle *dataRef, OSType *dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataRef

    Points to a variable to receive the data reference handle.

    dataRefType

    Points to a variable to receive a constant that identifies the data reference type. See Data References.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    The caller is responsible for disposing of the returned data reference handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current output file for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputFile ( GraphicsExportComponent ci, FSSpec *theFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    theFile

    Points to a variable to receive the FSSpec.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Gets the type and creator codes for the output file in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputFileTypeAndCreator ( GraphicsExportComponent ci, OSType *fileType, OSType *fileCreator );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    fileType

    Receives the file type for the new image file. See File Types and Creators.

    fileCreator

    Receives the file creator for the new image file. See File Types and Creators.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current output handle for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputHandle ( GraphicsExportComponent ci, Handle *h );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    h

    Points to a variable to receive the handle.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the output starting offset and maximum size limit for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputOffsetAndMaxSize ( GraphicsExportComponent ci, unsigned long *offset, unsigned long *maxSize, Boolean *truncateFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    offset

    On return, a value describing the byte offset of the image data from the beginning of the data reference. If you are not interested in this information, you may pass NIL.

    maxSize

    On return, a value describing the maximum size limit. If you are not interested in this information, you may pass NIL.

    truncateFile

    A Boolean value; TRUE means to truncate the file, FALSE means not.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current output data reference for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputDataReference ( GraphicsExportComponent ci, Handle dataRef, OSType dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataRef

    A QuickTime data reference.

    dataRefType

    The type of the data reference; see Data References.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Defines the output file for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputFile ( GraphicsExportComponent ci, const FSSpec *theFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    theFile

    an FSSpec structure that identifies the file.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the file type and creator codes for the output file of a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputFileTypeAndCreator ( GraphicsExportComponent ci, OSType fileType, OSType fileCreator );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    fileType

    The file type for the new image file, such as 'JPEG'. See File Types and Creators.

    fileCreator

    The file creator for the new image file. This parameter may be 0, in which case a default file creator for this file type is used. See File Types and Creators.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets a handle to the output of a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputHandle ( GraphicsExportComponent ci, Handle h );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    h

    The output handle.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies the output starting offset and maximum size limit for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputOffsetAndMaxSize ( GraphicsExportComponent ci, unsigned long offset, unsigned long maxSize, Boolean truncateFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    offset

    The byte offset of the image data from the beginning of the data reference.

    maxSize

    A value describing the maximum size limit.

    truncateFile

    A Boolean value; TRUE means to truncate the file.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input data reference for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputDataReference ( GraphicsExportComponent ci, Handle *dataRef, OSType *dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataRef

    Points to a variable to receive the data reference handle.

    dataRefType

    Points to a variable to receive the data reference type.

    Return Value

    See Error Codes. If the current source is not a data reference, the function returns paramErr. The function returns noErr if there is no error.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Special Considerations

    The caller is responsible for disposing of the returned data reference handle.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input file for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputFile ( GraphicsExportComponent ci, FSSpec *theFile );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    theFile

    A pointer to the file specification of the file containing the graphics data.

    Return Value

    See Error Codes. Returns noErr if there is no error. If the current source is not a file, the function returns paramErr.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input graphics importer instance for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputGraphicsImporter ( GraphicsExportComponent ci, GraphicsImportComponent *grip );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    grip

    Points to a variable to receive the source graphics importer.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You must get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input graphics world for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputGWorld ( GraphicsExportComponent ci, GWorldPtr *gworld );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    gworld

    Points to a variable to receive the source graphics world.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input handle for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputHandle ( GraphicsExportComponent ci, Handle *h );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    h

    A pointer to receive the handle.

    Return Value

    See Error Codes. Returns noErr if there is no error. If the current source is not a handle, the function returns paramErr.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input picture in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputPicture ( GraphicsExportComponent ci, PicHandle *picture );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    picture

    Points to a variable to receive the source picture.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input pixmap in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputPixmap ( GraphicsExportComponent ci, PixMapHandle *pixmap );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    pixmap

    Points to a variable to receive the source PixMap structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current input pointer in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputPtr ( GraphicsExportComponent ci, Ptr *p, unsigned long *size );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    p

    A pointer to receive a pointer containing the graphics data.

    size

    A pointer to a value describing the size of the image data in bytes.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to get the source of a graphics export operation. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a compressed image stored in a data reference.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputDataReference ( GraphicsExportComponent ci, Handle dataRef, OSType dataRefType, ImageDescriptionHandle desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataRef

    A QuickTime data reference. See Data References.

    dataRefType

    The type of the data reference; see Data References.

    desc

    A handle to an ImageDescription structure, describing the compressed data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a compressed image stored in a file.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputFile ( GraphicsExportComponent ci, const FSSpec *theFile, ImageDescriptionHandle desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    theFile

    A pointer to the FSSpec structure for the file containing the graphics data.

    desc

    A handle to an ImageDescription structure that describes the compressed data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is to be drawn by a graphics importer instance.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputGraphicsImporter ( GraphicsExportComponent ci, GraphicsImportComponent grip );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    grip

    The source graphics importer component instance.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Special Considerations

    It is the caller's responsibility to dispose of the graphics importer.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a graphics world.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputGWorld ( GraphicsExportComponent ci, GWorldPtr gworld );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    gworld

    The source graphics world. It must be a real graphics world; you may not pass an ordinary color GrafPort.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Special Considerations

    The graphics exporter will never dispose the graphics world.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a compressed image referenced by a handle.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputHandle ( GraphicsExportComponent ci, Handle h, ImageDescriptionHandle desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    h

    A handle to graphics data.

    desc

    A handle to an ImageDescription structure that describes the compressed data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a picture.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputPicture ( GraphicsExportComponent ci, PicHandle picture );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    picture

    A handle to the source picture.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a pixmap.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputPixmap ( GraphicsExportComponent ci, PixMapHandle pixmap );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    pixmap

    The source PixMap structure.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Special Considerations

    It is the caller's responsibility to dispose of the pixmap.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies that the source image for a graphics export operation is a compressed image stored at a fixed address in memory.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputPtr ( GraphicsExportComponent ci, Ptr p, unsigned long size, ImageDescriptionHandle desc );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    p

    A pointer to a value the image.

    size

    A value describing the size of the image data in bytes.

    desc

    A handle to an ImageDescription structure that describes the compressed data.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    You can use this function to specify a source before you call GraphicsExportDoExport. The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a graphics world, a PixMap structure, or a piece of compressed data described by an ImageDescription structure. Compressed data can be in a file, handle, pointer, or other data reference. The application must make sure that the source is not disposed of before the graphics exporter instance is closed or given a new source. All of the get and set functions for these sources are implemented by the base graphics exporter; format-specific importers should delegate all of them.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the graphics exporter's current Exif export setting.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetExifEnabled ( GraphicsExportComponent ci, Boolean *exifEnabled );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component. This function is supported only by the TIFF and JPEG graphics exporters.

    exifEnabled

    Pass a pointer to a variable that will be set to TRUE if Exif export is enabled.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.1 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current thumbnail creation setting for the graphics exporter when exporting Exif files.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetThumbnailEnabled ( GraphicsExportComponent ci, Boolean *thumbnailEnabled, long *maxThumbnailWidth, long *maxThumbnailHeight );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component. This function is supported only by the TIFF and JPEG graphics exporters.

    thumbnailEnabled

    Points to a variable to receive the current thumbnail setting. Pass NIL if you do not want to receive this information.

    maxThumbnailWidth

    Points to a variable to receive the current maximum thumbnail width. Pass NIL if you do not want to receive this information.

    maxThumbnailHeight

    Points to a variable to receive the current maximum thumbnail height. Pass NIL if you do not want to receive this information.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.1 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Determines whether or not the graphics exporter component should create Exif files.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetExifEnabled ( GraphicsExportComponent ci, Boolean enableExif );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component. This function is supported only by the TIFF and JPEG graphics exporters.

    enableExif

    Pass TRUE to enable Exif file creation.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Turning on Exif export disables incompatible settings, such as grayscale JPEG and compressed TIFF, and enables export of Exif metadata.

    Import Statement

    Availability

    Available in OS X v10.1 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Determines whether or not the graphics exporter component should create an embedded thumbnail inside an exported Exif file.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetThumbnailEnabled ( GraphicsExportComponent ci, Boolean enableThumbnail, long maxThumbnailWidth, long maxThumbnailHeight );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component. This function is currently supported only by the TIFF and JPEG graphics exporters.

    enableThumbnail

    Pass TRUE to turn thumbnail creation on; otherwise pass FALSE.

    maxThumbnailWidth

    The maximum width for created thumbnails.

    maxThumbnailHeight

    The maximum height for created thumbnails. If one maximum dimension is 0, only the other will be used. If both maximum dimensions are 0, the graphics exporter will decide for itself. The graphics exporter will not change the aspect ratio of the Exif image when creating the thumbnail, nor will it create a thumbnail larger than the image.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    The JPEG graphics exporter can create thumbnails only when writing Exif files.

    Import Statement

    Availability

    Available in OS X v10.1 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Returns the current file position for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetOutputMark ( GraphicsExportComponent ci, unsigned long *mark );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    mark

    Receives the current file position, as a byte offset from the beginning of the output data reference.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    Not all output data types support the current file position feature.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Reads output image data in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportReadOutputData ( GraphicsExportComponent ci, void *dataPtr, unsigned long dataOffset, unsigned long dataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataPtr

    A pointer to a memory block to receive the data.

    dataOffset

    The offset of the image data within the data reference. The function begins reading image data from this offset.

    dataSize

    The number of bytes of image data to read.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Special Considerations

    Not all output data types support this function.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Seeks to the specified file position in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetOutputMark ( GraphicsExportComponent ci, unsigned long mark );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    mark

    The new file position, specified as a byte offset from the beginning of the output data reference.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Writes output image data in a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportWriteOutputData ( GraphicsExportComponent ci, const void *dataPtr, unsigned long dataSize );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    dataPtr

    A pointer to a memory block containing the data.

    dataSize

    The number of bytes of image data to write.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    This function is used by format-specific graphics exporters to write output data.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Performs a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportDoExport ( GraphicsExportComponent ci, unsigned long *actualSizeWritten );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    actualSizeWritten

    Points to a variable to receive the number of bytes written. If you are not interested in this information, pass NIL.

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Discussion

    Before calling this function , you must specify an input image, using one of the GraphicsExportSetInput... functions, and a destination for the output image file, using one of the GraphicsExportSetOutput... functions.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the CGBitmapContext that the graphics exporter is using as its input image.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputCGBitmapContext ( GraphicsExportComponent ci, CGContextRef *bitmapContextRefOut );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    bitmapContextRef

    A reference to the Core Graphics context.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Determines which Core Graphics CGImage is the source for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportGetInputCGImage ( GraphicsExportComponent ci, CGImageRef *imageRefOut );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    imageRef

    A reference to a Core Graphics image.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the CGBitmapContext that the graphics exporter will use as its input image.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputCGBitmapContext ( GraphicsExportComponent ci, CGContextRef bitmapContextRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    bitmapContextRef

    A reference to the Core Graphics context.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Specifies a Core Graphics CGImage as the source for a graphics export operation.

    Declaration

    Objective-C

    ComponentResult GraphicsExportSetInputCGImage ( GraphicsExportComponent ci, CGImageRef imageRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics exporter component.

    imageRef

    A reference to a CG image.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Imports an image as a Core Graphics CGImage.

    Declaration

    Objective-C

    ComponentResult GraphicsImportCreateCGImage ( GraphicsImportComponent ci, CGImageRef *imageRefOut, UInt32 flags );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    imageRefOut

    A reference to the CG image to be created.

    flags

    A flag (see below) that determines the settings to use. kGraphicsImportCreateCGImageUsingCurrentSettings Use the current settings. See these constants:

    • kGraphicsImportCreateCGImageUsingCurrentSettings

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Presents a dialog box that lets the user save an imported image in a foreign file format.

    Declaration

    Objective-C

    ComponentResult GraphicsImportDoExportImageFileToDataRefDialog ( GraphicsImportComponent ci, Handle inDataRef, OSType inDataRefType, CFStringRef prompt, ModalFilterYDUPP filterProc, OSType *outExportedType, Handle *outDataRef, OSType *outDataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    inDefaultDataRef

    A data reference that specifies the default export location.

    inDefaultDataRefType

    The type of the data reference that specifies the default export location.

    prompt

    A reference to a CFString that contains the prompt text string for the dialog.

    filterProc

    A modal filter function; see ModalFilterYDProc in the QuickTime API Reference.

    outExportedType

    A pointer to an OSType entity where the type of the exported file will be returned.

    outExportedDataRef

    A pointer to an handle where the data reference to the exported file will be returned.

    outExportedDataRefType

    A pointer to an OSType entity where the type of the data reference that points to the exported file will be returned.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Discussion

    This function presents a file dialog that lets the user to specify a file to which the exported data goes and a format into which image data is exported. By using data references, a long file name or Unicode file name can be used as a default file name as well as the name of the file into which the export data goes. This function is equivalent to GraphicsImportDoExportImageFileDialog.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Saves an imported image in a foreign file format.

    Declaration

    Objective-C

    ComponentResult GraphicsImportExportImageFileToDataRef ( GraphicsImportComponent ci, OSType fileType, OSType fileCreator, Handle dataRef, OSType dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    fileType

    The Mac OS file type for the new file, which determines the file format.

    fileCreator

    The creator type of the new file.

    dataRef

    A data reference that specifies a storage location to which the image is to be exported.

    dataRefType

    The type of the data reference.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Discussion

    This function exports the imported image as a foreign file format specified by fileType. The exported data will be saved into a storage location specified by a data reference. You can use data reference functions to create a data reference for a file that has long or Unicode file name. This function is equivalent to GraphicsImportExportImageFile.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Deprecated.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetAliasedDataReference ( GraphicsImportComponent ci, Handle *dataRef, OSType *dataRefType );

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Undocumented

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetBaseDataOffsetAndSize64 ( GraphicsImportComponent ci, wide *offset, wide *size );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    offset

    Undocumented

    size

    Undocumented

    Return Value

    See Error Codes. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.1 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves a ColorSync profile from a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetDestinationColorSyncProfileRef ( GraphicsImportComponent ci, CMProfileRef *destinationProfileRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    destinationProfileRef

    On return, a pointer to an opaque struct containing a ColorSync profile.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the generic colorsync profile for a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetGenericColorSyncProfile ( GraphicsImportComponent ci, OSType pixelFormat, void *reservedSetToNULL, UInt32 flags, Handle *genericColorSyncProfileOut );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    pixelFormat

    See Pixel Formats in the QuickTime API Reference.

    reservedSetToNULL

    Pass NIL.

    flags

    Currently not used.

    genericColorSyncProfileOut

    A handle to the the generic colorsync profile for the graphics importer.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Retrieves the override ColorSync profile for a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportGetOverrideSourceColorSyncProfileRef ( GraphicsImportComponent ci, CMProfileRef *outOverrideSourceProfileRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    outOverrideSourceProfileRef

    A pointer to an opaque struct containing a ColorSync profile.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Creates a storage location that contains a QuickDraw picture for an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSaveAsPictureToDataRef ( GraphicsImportComponent ci, Handle dataRef, OSType dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataRef

    A data reference that specifies a storage location to which the picture is to be saved.

    dataRefType

    The type of the data reference.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Discussion

    This function saves the imported image as a QuickDraw picture into a storage location specified through a data reference. You can use Data Reference Utilities to create a data reference for a file that has long or Unicode file name. This function is equivalent to GraphicsImporterSaveAsPictureFile.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Creates a storage location that contains a QuickTime image of an imported image.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSaveAsQuickTimeImageFileToDataRef ( GraphicsImportComponent ci, Handle dataRef, OSType dataRefType );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    dataRef

    A data reference that specifies a storage location to which the picture is to be saved.

    dataRefType

    The type of the data reference.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Discussion

    This function saves the imported image as a QuickTime image into a storage location specified through a data reference. You can use data reference functions to create a data reference for a file that has long or Unicode file name. This function is equivalent to GraphicsImportSaveAsQuickTimeImageFile.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the ColorSync profile for a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetDestinationColorSyncProfileRef ( GraphicsImportComponent ci, CMProfileRef newDestinationProfileRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    newDestinationProfileRef

    A pointer to an opaque struct containing a ColorSync profile.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Sets the override ColorSync profile for a graphics importer component.

    Declaration

    Objective-C

    ComponentResult GraphicsImportSetOverrideSourceColorSyncProfileRef ( GraphicsImportComponent ci, CMProfileRef newOverrideSourceProfileRef );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    newOverrideSourceProfileRef

    A pointer to an opaque struct containing a ColorSync profile.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

  • Asks whether GraphicsImportDraw will use color matching if called with the current importer settings.

    Declaration

    Objective-C

    ComponentResult GraphicsImportWillUseColorMatching ( GraphicsImportComponent ci, Boolean *outWillMatch );

    Parameters

    ci

    The component instance that identifies your connection to the graphics importer component.

    outWillMatch

    On return, a pointer to a Boolean set to TRUE if the graphics importer will use color matching, FALSE otherwise.

    Return Value

    See Error Codes in the QuickTime API Reference. Returns noErr if there is no error.

    Import Statement

    Availability

    Available in OS X v10.3 and later.

    Deprecated in OS X v10.9.

    Not available to 64-bit applications.

Callbacks

  • Determines how the Dialog Manager filters events.

    Declaration

    Objective-C

    typedef Boolean (*ModalFilterYDProcPtr) ( DialogPtr theDialog, EventRecord *theEvent, short *itemHit, void *yourDataPtr);

    Parameters

    theDialog

    A pointer to the dialog record.

    theEvent

    A pointer to the event record.

    itemHit

    The item number.

    yourDataPtr

    A pointer to the data received from your application, if any.

    Return Value

    Your ModalFilterProc callback returns a Boolean value that reports whether it handled the event. If your function returns a value of FALSE, QuickTime processes the event through its own filters. If your function returns a value of TRUE, QuickTime returns with no further action.

    Discussion

    The ModalFilterProc callback used with custom file dialogs requires the additional yourDataPtr parameter.

    Import Statement

Data Types

  • Represents a type used by the Graphics Import and Export API.

    Declaration

    Objective-C

    typedef ComponentInstance GraphicsExportComponent;

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Not available to 64-bit applications.

  • Represents a type used by the Graphics Import and Export API.

    Declaration

    Objective-C

    typedef ComponentInstance GraphicsImportComponent;

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Not available to 64-bit applications.

  • Represents a type used by the Graphics Import and Export API.

    Declaration

    Swift

    typealias ModalFilterYDUPP = ModalFilterYDProcPtr

    Objective-C

    typedef STACK_UPP_TYPE(ModalFilterYDProcPtr) ModalFilterYDUPP;

    Import Statement

    import Carbon

    Availability

    Available in OS X v10.0 and later.

Constants

  • Constants passed to GraphicsImportDoesDrawAllPixels.

    Declaration

    Objective-C

    enum { graphicsImporterDrawsAllPixels = 0, graphicsImporterDoesntDrawAllPixels = 1, graphicsImporterDontKnowIfDrawAllPixels = 2 };

    Import Statement

  • Constants that represent the flags of graphics importers.

    Declaration

    Objective-C

    enum { graphicsImporterIsBaseImporter = 1L << 0, graphicsImporterCanValidateFile = 1L << 9, graphicsImporterSubTypeIsFileExtension = 1L << 12, graphicsImporterHasMIMEList = 1L << 14, graphicsImporterUsesImageDecompressor = 1L << 23 }; enum { kGraphicsImporterDontDoGammaCorrection = 1L << 0, kGraphicsImporterTrustResolutionFromFile = 1L << 1, kGraphicsImporterEnableSubPixelPositioning = 1L << 2, kGraphicsImporterDontUseColorMatching = 1L << 3 /* set this flag (*before * calling GraphicsImportGetColorSyncProfile ) if you do matching yourself */ };

    Import Statement

  • Constants passed to GraphicsImportCreateCGImage.

    Declaration

    Objective-C

    enum { kGraphicsImportCreateCGImageUsingCurrentSettings = 1L << 0 };

    Import Statement

  • Constants that represent the properties of PNGs.

    Declaration

    Objective-C

    enum { kQTPNGFilterPreference = 'pngf', /* UInt32*/ kQTPNGFilterBestForColorType = 'bflt', kQTPNGFilterNone = 0, kQTPNGFilterSub = 1, kQTPNGFilterUp = 2, kQTPNGFilterAverage = 3, kQTPNGFilterPaeth = 4, kQTPNGFilterAdaptivePerRow = 'aflt', kQTPNGInterlaceStyle = 'ilac', /* UInt32*/ kQTPNGInterlaceNone = 0, kQTPNGInterlaceAdam7 = 1 };

    Constants

    • kQTPNGFilterPreference

      kQTPNGFilterPreference

      UInt32.

      Available in OS X v10.0 and later.

      Not available to 64-bit applications.

    • kQTPNGInterlaceStyle

      kQTPNGInterlaceStyle

      UInt32.

      Available in OS X v10.0 and later.

      Not available to 64-bit applications.

    Import Statement

  • Constants that represent the properties of TIFFs.

    Declaration

    Objective-C

    enum { kQTTIFFCompressionMethod = 'tifc', /* UInt32*/ kQTTIFFCompression_None = 1, kQTTIFFCompression_PackBits = 32773L, kQTTIFFLittleEndian = 'tife' /* UInt8 (boolean)*/ }; enum { kQTTIFFUserDataModelPixelScale = 0x7469830E , /* 3 DOUBLEs */ kQTTIFFUserDataModelTransformation = 0x746985D8 , /* 16 DOUBLEs */ kQTTIFFUserDataModelTiepoint = 0x74698482 , /* n DOUBLEs */ kQTTIFFUserDataGeoKeyDirectory = 0x746987AF , /* n SHORTs */ kQTTIFFUserDataGeoDoubleParams = 0x746987B0 , /* n DOUBLEs */ kQTTIFFUserDataGeoAsciiParams = 0x746987B1 , /* n ASCIIs */ kQTTIFFUserDataIntergraphMatrix = 0x74698480 /* 16 or 17 DOUBLEs */ }; enum { kQTTIFFUserDataOrientation = 0x74690112 , /* 1 SHORT */ kQTTIFFUserDataTransferFunction = 0x7469012D , /* n SHORTs */ kQTTIFFUserDataWhitePoint = 0x7469013E , /* 2 RATIONALs */ kQTTIFFUserDataPrimaryChromaticities = 0x7469013F , /* 6 RATIONALs */ kQTTIFFUserDataTransferRange = 0x74690156 , /* 6 SHORTs */ kQTTIFFUserDataYCbCrPositioning = 0x74690213 , /* 1 SHORT */ kQTTIFFUserDataReferenceBlackWhite = 0x74690214 /* n LONGs */ };

    Constants

    • kQTTIFFCompressionMethod

      kQTTIFFCompressionMethod

      UInt32.

      Available in OS X v10.0 and later.

      Not available to 64-bit applications.

    • kQTTIFFCompression_PackBits

      kQTTIFFCompression_PackBits

      PackBits compression. This value is 32773L

      Available in OS X v10.0 and later.

      Not available to 64-bit applications.

    • kQTTIFFLittleEndian

      kQTTIFFLittleEndian

      UInt8 (Boolean).

      Available in OS X v10.0 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataModelPixelScale

      kQTTIFFUserDataModelPixelScale

      3 DOUBLEs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataModelTransformation

      kQTTIFFUserDataModelTransformation

      16 DOUBLEs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataModelTiepoint

      kQTTIFFUserDataModelTiepoint

      N DOUBLEs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataGeoKeyDirectory

      kQTTIFFUserDataGeoKeyDirectory

      N SHORTs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataGeoDoubleParams

      kQTTIFFUserDataGeoDoubleParams

      N DOUBLEs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataGeoAsciiParams

      kQTTIFFUserDataGeoAsciiParams

      N ASCIIs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataIntergraphMatrix

      kQTTIFFUserDataIntergraphMatrix

      16 or 17 DOUBLEs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataOrientation

      kQTTIFFUserDataOrientation

      1 SHORT.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataTransferFunction

      kQTTIFFUserDataTransferFunction

      N SHORTs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataWhitePoint

      kQTTIFFUserDataWhitePoint

      2 RATIONALs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataPrimaryChromaticities

      kQTTIFFUserDataPrimaryChromaticities

      6 RATIONALs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataTransferRange

      kQTTIFFUserDataTransferRange

      6 SHORTs.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    • kQTTIFFUserDataYCbCrPositioning

      kQTTIFFUserDataYCbCrPositioning

      1 SHORT.

      Available in OS X v10.2 and later.

      Not available to 64-bit applications.

    Import Statement