ADC Home > Reference Library > Technical Q&As > QuickTime > Compression & Decompression >

How to Tell Whether a Picture is QuickTime-Compressed

Q How can I tell whether or not a picture is QuickTime-compressed?

A The key to your question is "sit in the bottlenecks." If the picture contains any QuickTime-compressed images, the images will need to pass through the StdPix bottleneck. This is a new graphics routine introduced with QuickTime. Unlike standard QuickDraw images, which only call StdBits, QuickTime-compressed images need to be decompressed first in the StdPix routine. Then QuickDraw uses StdBits to render the decompressed image. So, swap out the QuickDraw bottlenecks, and put some code in the StdPix routine. If it's called when you call DrawPicture, you know you have a compressed picture. To determine the type of compression, you can access the image description using GetCompressedPixMapInfo. The cType field of the ImageDescription record will give you the codec type. See the Snippets: Imaging: Graphics: CollectPictColors snippet and page 46-47 of develop Issue 13 for further reference on swapping out the bottlenecks.

[May 01 1995]


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.