## Graphics Importers

QPix accomplishes most of its functionality with the help of QuickTime's graphics import components, aka "graphics importers".

When dealing with image files and plug-in areas QPix uses graphics importers internally and masks out all potentially confusing details. However, in order to provide the most of QuickTime's capabilities and flexibility, QPix also includes a set of commands for directly working with graphics importers.

Graphics importers are code modules. Each importer "knows" all the details of a specific graphic file format and provides specific services to the client software. Graphics importers have the following properties:

Type (String4) (In pure IM terms, this is the component subtype field)

Flags (Longint)

Name (String255)

The files supported by a graphics importer are specified by the importer's type in conjunction with bit #12 of the flags property. If bit #12 is off, the importer's type is the Mac file type of the supported files. If bit #12 is on, it is a filename extension.

Examples

Type: '8BPS'

Flags: 0x40000000

Name: Photoshop

This is the Photoshop importer. It supports files of type '8BPS' (0x40000000 bit #12 is false).

Type: 'GIF '

Flags: 0x40001200

Name: GIF

This importer knows how to handle GIF files. It supports files with the .GIF filename extension (0x40001200 bit #12 is true).

Note

- Some terms and concepts are paraphrased in this chapter in an attempt to better match 4D's terminology and way of doing things. For reference material, check QuickTime Developer's Documentation.
- When working with graphics importers, you will need to create an importer instance, work with it, and destroy it when no longer needed.

QPx_NewImporterForFile | Creates a graphics importer instance for the image stored in a file
QPx_NewImporterForData | Creates a graphics importer instance for the image data stored in a BLOB
QPx_NewImporterForURL | Creates a graphics importer from a URL
QPx_NewImporterForPict | Creates a graphics importer instance for the image data stored in a BLOB
QPx_NewImporter | Creates a graphics importer instance
QPx_FreeImporter | Destroys an existing importer instance
QPx_SetImporterFile | Assigns an image file to a graphics importer
QPx_GetImporterFile | Returns the pathname of the file associated with a graphics importer
QPx_SetImporterData | Assigns the image data contained in a BLOB to a graphics importer
QPx_GetImporterData | Returns the image data associated with a graphics importer
QPx_SetImporterOffsetAndLimit | Specifies start and end of data within a container
QPx_GetImporterOffsetAndLimit | Returns start and end of data within a container
QPx_ValidateImporter | Asks a graphic importer to test image data
QPx_GetImporterImageSize | Returns the dimensions of the image associated with a graphics importer
QPx_GetImporterImageRes | Returns the resolutions of the image associated with a graphics importer
QPx_GetImporterImageDepth | Returns the pixel depth of the image associated with a graphics importer
QPx_GetImporterInfo | Returns information about a graphics importer
QPx_GetImporterColorSpace | Returns the color space of the image associated with a graphics importer
QPx_GetImporterColorProfile | Returns the color profile of the image associated with a graphics importer
QPx_GetImporterEmbeddedThumb | Reads the embedded thumbnail from an image
QPx_CreateImporterThumbnail | Creates a high quality thumbnail from image data associated with a graphic importer
QPx_ReadImporterImageInPict | Reads the image associated with a graphics importer
QPx_ExportImporterImage | Exports a graphic importer
QPx_ExportImporterImageToBLOB | Exports a graphic importer into a BLOB
QPx_GetImporterTagContainer | Extracts the tag container from the image associated with a graphics importer
QPx_CountImporterFrames | Returns the number of images in a multi-image container
QPx_SetImporterFrameIndex | Changes the current frame in a multi-image container
QPx_GetImporterFrameIndex | Returns the current frame of a multi-image container
QPx_GetImporterFrameType | Returns the type of a frame in a multi-frame image.

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:44:38