ADC Home > Reference Library > Technical Q&As > Carbon > Graphics & Imaging >
Important: The information in this document is Not Recommended and should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: I want to create gray-scaled images at resolutions greater than 8 bits, and display them on the Mac. What is the best way to go about this? A:
Quickdraw doesn't have any inherent support for gray-scaled The Quickdraw color table for the offscreen should ramp from white at location 0 to black at location 255. Quickdraw always assumes that white and black will be in these locations, and does not perform correctly when this isn't the case. However, this is the opposite of the intensity value in a gray-scaled image, where black would be at 0, and white at 255. The other thing that is required is a routine to convert from the custom data structure to the QuickDraw offscreen.
This conversion can be accomplished by taking the top 8 bits of each gray pixel, inverting them and copying it into the offscreen
Quickdraw GX does include a luminance-based color model ( |
|