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

48 bit & 64 bit Pixel Format support in QuickTime


Q: Does QuickTime support RGB pixel formats with more than 8-bits-per-channel? If so, what is the format of the pixels and what is the correct FourCC to use in a decompressors wantedDestinationPixelTypes list?

A: Yes, QuickTime supports both 48 bit RGB and 64 bit ARGB pixel formats. Additionally it supports 32 bit Grey with Alpha and 16 bit Grey.

ImageCompression.h defines the following FourCC's:

          k64ARGBCodecType      = FOUR_CHAR_CODE('b64a')
          k48RGBCodecType       = FOUR_CHAR_CODE('b48r')
          k32AlphaGrayCodecType = FOUR_CHAR_CODE('b32a')
          k16GrayCodecType      = FOUR_CHAR_CODE('b16g')

You can use these values for the PixelFormat parameter when creating GWorlds with QTNewGWorld and QTNewGWorldFromPtr, or in the wantedDestinationPixelTypes list of pixel formats your decompressor is able to support for the given source image data and destination.

The 16-bit integer samples in all of these pixel formats are big-endian and full-range:

           0x0000 designates no intensity
           0xffff designates maximum intensity

These pixel formats are available in QuickTime (4.0 and later) to enable the reading and writing of 16-bit-per-channel image data to and from image files. QuickTime also contains a transfer codec able to scale these pixel formats and draw to their 8-bit-per-channel equivalents.

Note: While Quartz 2D supports 16-bit-per-channel pixel formats, QuickDraw does not. Developers should not attempt to use QuickDraw to draw in such GWorlds as the results can be quite vulgar.

References:

Image Decompressors and the wantedDestinationPixelTypes List

QuickTime Pixel Format FourCCs


[Feb 07 2002]


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.