Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Graphics Exporter Component Functions By Task
This chapter describes the constants, data types, and functions in the Graphics Exporter Component.
Constants
The following constants are used to specify graphics exporter characteristics:
enum { |
GraphicsExporterComponentType = FOUR_CHAR_CODE('grex'), |
kBaseGraphicsExporterSubType = FOUR_CHAR_CODE('base') |
}; |
enum { |
graphicsExporterIsBaseExporter = 1L << 0, |
graphicsExporterCanTranscode = 1L << 1, |
graphicsExporterUsesImageCompressor = 1L << 2 |
}; |
Data Types
The graphics exporter component type and subtype are defined as follows:
typedef ComponentInstance GraphicsExportComponent; |
Functions
The graphics export functions listed in the following sections are grouped by task.
Exporting
This function is used to perform export operations.
GraphicsExportDoExport
Internal Routines
These functions are used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call them.
GraphicsExportCanTranscode
GraphicsExportDoTranscode
GraphicsExportCanUseCompressor
GraphicsExportDoUseCompressor
GraphicsExportDoStandaloneExport
Finding Out About Image Formats
These functions return information about the image format supported by a graphics exporter. Format-specific exporters must implement all three of these calls.
GraphicsExportGetDefaultFileTypeAndCreator
GraphicsExportGetDefaultFileNameExtension
GraphicsExportGetMIMETypeList
Obtaining Graphics Exporter Settings
These functions are used for obtaining graphics exporter settings and displaying a settings dialog box.
GraphicsExportRequestSettings
GraphicsExportSetSettingsFromAtomContainer
GraphicsExportGetSettingsAsAtomContainer
GraphicsExportGetSettingsAsText
Accessing Graphics Exporter Settings
Graphics exporters may implement some or none of these functions. To determine whether a particular setting is available, use CallComponentCanDo
.
GraphicsExportSetDontRecompress
GraphicsExportGetDontRecompress
GraphicsExportSetInterlaceStyle
GraphicsExportGetInterlaceStyle
GraphicsExportSetMetaData
GraphicsExportGetMetaData
GraphicsExportSetTargetDataSize
GraphicsExportGetTargetDataSize
GraphicsExportSetCompressionMethod
GraphicsExportGetCompressionMethod
GraphicsExportSetCompressionQuality
GraphicsExportGetCompressionQuality
GraphicsExportSetResolution
GraphicsExportGetResolution
GraphicsExportSetDepth
GraphicsExportGetDepth
GraphicsExportSetColorSyncProfile
GraphicsExportGetColorSyncProfile
Getting and Setting Progress Procs
These functions are always implemented by the base graphics exporter.
GraphicsExportSetProgressProc
GraphicsExportGetProgressProc
Specifying Sources for Input Images
These functions specify the source for input images. You must specify a source before you can call GraphicsExportDoExport
.
The source can be a QuickTime graphics importer component instance, a QuickDraw Picture, a GWorld
or a PixMap
. Or it can be a piece of compressed data described by an image description. 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 these functions are implemented by the base graphics exporter. Format-specific importers should delegate all of them.
GraphicsExportSetInputDataReference
GraphicsExportGetInputDataReference
GraphicsExportSetInputFile
GraphicsExportGetInputFile
GraphicsExportSetInputHandle
GraphicsExportGetInputHandle
GraphicsExportSetInputPtr
GraphicsExportGetInputPtr
GraphicsExportSetInputGraphicsImporter
GraphicsExportGetInputGraphicsImporter
GraphicsExportSetInputPicture
GraphicsExportGetInputPicture
GraphicsExportSetInputGWorld
GraphicsExportGetInputGWorld
GraphicsExportSetInputPixmap
GraphicsExportGetInputPixmap
Restricting the Range of an Input Image's Source
These functions are only applicable when the input is a data reference, file, handle or pointer.
GraphicsExportSetInputOffsetAndLimit
GraphicsExportGetInputOffsetAndLimit
Reading Input Data
These functions are used by format-specific graphics exporters when transcoding. Applications will not normally need to call these functions.
GraphicsExportMayExporterReadInputData
GraphicsExportGetInputDataSize
GraphicsExportReadInputData
Accessing the Input Image
These functions are used by format-specific graphics exporters. When doing a standalone export, an exporter will typically call GraphicsExportGetInputImageDescription
or GraphicsExportGetInputImageDimensions
and GraphicsExportGetInputImageDepth
to determine the image’s bounds and depth, and then allocate an offscreen GWorld
and call GraphicsExportDrawInputImage
to draw portions of the image into the GWorld
.
GraphicsExportGetInputImageDescription
GraphicsExportGetInputImageDimensions
GraphicsExportGetInputImageDepth
GraphicsExportDrawInputImage
Destinations for Output Images
These functions are used to specify destinations for output images.
GraphicsExportSetOutputDataReference
GraphicsExportGetOutputDataReference
GraphicsExportSetOutputFile
GraphicsExportGetOutputFile
GraphicsExportSetOutputHandle
GraphicsExportGetOutputHandle
GraphicsExportSetOutputOffsetAndMaxSize
GraphicsExportGetOutputOffsetAndMaxSize
GraphicsExportSetOutputFileTypeAndCreator
GraphicsExportGetOutputFileTypeAndCreator
Writing Output Data
These functions are used by format-specific graphics exporters to write output data.
GraphicsExportWriteOutputData
GraphicsExportSetOutputMark
GraphicsExportGetOutputMark
GraphicsExportReadOutputData
Copyright © 2005, 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-01-10