Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

New Image Compression APIs

The following are Image Compression APIs that are new in QuickTime 6. These APIs allow compressors to supply the User Interface for their options within the compression dialog.

ImageCodecGetDITLForSize

Returns DITLs of various size in pixels.

ComponentResult ImageCodecGetDITLForSize (
ComponentInstance ci,
Handle *ditl,
Point *requestedSize);

Parameters
ci

An image codec component instance. You get the sub-dialog from the component here.

ditl

A pointer to a handle. Dialog items are returned here.

requestedSize

The requested size in pixels that fits into the dialog.

Discussion

This routine allows the image codec to return DITLs of various size in pixels. Two special values for the size, kSGSmallestDITLSize and kSGLargestDITLSize, request the smallest or largest size of the DITL.

Once you have created the area, you can use the other calls described in this section to handle the dialog items managed by your panel component.

The codec should return badComponentSelector for sizes it does not implement. The codec must at a minimum support kSGSmallestDITLSize if it implements this call.

Introduced in QuickTime 6.

Availability
Declared In
ImageCodec.h

C interface file: ImageCodec.h

ImageCodecDITLInstall

Installs added items in an image codec settings dialog box before the dialog box is displayed to the user.

ComponentResult ImageCodecDITLInstall (
ComponentInstance ci,
DialogRef d,
short itemOffset

Parameters
ci

An image codec component instance.

d
itemOffset

The offset to your image codec’s first item.

Availability
Declared In
ImageCodec.h

See “Error Codes” (IV–2718). Returns noErr if there is no error.

This routine installs added items in an image codec settings dialog box before the dialog box is displayed to the user.

Introduced in QuickTime 6.

C interface file: ImageCodec.h

ImageCodecDITLEvent

Lets a component receive and process dialog events.

ComponentResult ImageCodecDITLEvent (
ComponentInstance ci,
DialogRef d,
short itemOffset,
const EventRecord *theEvent,
short *itemHit,
Boolean *handled);

Parameters
ci

An image codec component instance.

d

A dialog reference identifying the settings dialog box.

itemOffset

The offset to your panel’s first item in the dialog box.

theEvent

A pointer to an EventRecord (IV–2302) structure. This structure contains information identifying the nature of the event.

itemHit

A pointer to a field that is to receive the item number in cases where your component handles the event. The number returned is an absolute, not a relative number, so it must be offset by the itemOffset parameter. handled

handled

A pointer to a Boolean value. Set this Boolean value to TRUE if you handle the event; set it to FALSE if you do not.

Availability
Declared In
ImageCodec.h

See “Error Codes” (IV–2718). Returns noErr if there is no error.

This routine allows a component to receive and process dialog events.

Introduced in QuickTime 6.

C interface file: ImageCodec.h

ImageCodecDITLItem

Receives and processes mouse clicks in the image codec settings dialog box.

ComponentResult ImageCodecDITLItem (
ComponentInstance ci,
DialogRef d,
short itemOffset,
short itemNum);

Parameters
ci

An image codec component instance.

d

A dialog reference identifying the settings dialog box.

itemOffset

The offset to your panel’s first item in the dialog box.

itemNum

The item number of the dialog item selected by the user. The sequence grabber provides an absolute item number. It is your responsibility to adjust this value to account for the offset to your panel’s first item in the dialog box.

Return Value

See “Error Codes” (IV–2718). Returns noErr if there is no error.

Discussion

An image codec component calls this function whenever the user clicks an item in the settings dialog box. Your component may then perform whatever processing is appropriate, depending upon the item number.

Introduced in QuickTime 6.

Availability
Declared In
ImageCodec.h

C interface file: ImageCodec.h

ImageCodecDITLRemove

Removes a panel from the image codec settings dialog box.

ComponentResult ImageCodecDITLRemove (
ComponentInstance ci,
DialogRef d,
short itemOffset);

Parameters
ci

An image codec component instance.

d

A dialog pointer identifying the settings dialog box.

itemOffset

The offset to your panel’s first item in the dialog box.

Availability
Declared In
ImageCodec.h

See “Error Codes” (IV–2718). Returns noErr if there is no error.

An image codec component calls this function just before removing your items from the settings dialog box.

Introduced in QuickTime 6.

C interface file: ImageCodec.h

ImageCodecDITLValidateInput

Validates the contents of the user dialog box for an image codec component.

ComponentResult ImageCodecDITLValidateInput (
ComponentInstance ci,
Boolean *ok);

Parameters
ci

An image codec component instance.

ok

A pointer to a Boolean value. Set this value to TRUE if the settings are OK; otherwise, set it to FALSE.

Return Value

See “Error Codes” (IV–2718). Returns noErr if there is no error.

Discussion

The image codec calls this function when the user clicks the OK button. If the user clicks the Cancel button, the image codec does not call this function. You indicate whether the settings are acceptable by setting the Boolean value referred to by the ok parameter. If you set this value to FALSE, the sequence grabber component ignores the OK button in the dialog box.

Introduced in QuickTime 6.

Availability
Declared In
ImageCodec.h

C interface file: ImageCodec.h



< Previous PageNext Page > Hide TOC


Last updated: 2002-07-01




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice