Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!ftanaka From: ftanaka@Apple.COM (Forrest Tanaka) Newsgroups: comp.graphics Subject: Re: 24-bit color Pict-2? Message-ID: <47703@apple.Apple.COM> Date: 3 Jan 91 16:34:41 GMT References: <1991Jan3.065804.17254@msuinfo.cl.msu.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 55 raja@cpswh.cps.msu.edu writes: >Excuse what may be an elementary question... >does PICT-2 support 24-bit color? The Macintosh PICT format consists of a small header followed by a sequence of an opcode, followed by the data for the opcode, followed by another opcode, followed by the data for that opcode, and so on until the end of the PICT. These opcodes specify colors, raster ops, pixel images, and lots of other stuff that's documented in Inside Macintosh volume V from Addison-Wesley. When 32-Bit QuickDraw 1.0 was released in May of 1989, it added two new opcodes to the PICT format that specifically support 15-bit and 24-bit color images. By default, 15-bit color images (16 bits per pixel, five bits each for red, green, and blue plus a one-bit alpha channel) is compressed using run-length encoding and 24-bit color images (32 bits per pixel, 8 bits each for red, green, and blue plus an eight-bit alpha channel) is compressed by sorting the red, green, and blue channels (and optionally the alpha channel) and using run-length encoding on the result. For those who don't know, 32-Bit QuickDraw is a file containing a lot of patches that gave Color QuickDraw 15-bit and 24-bit color support and made it act a lot better than it did before (mainly for error-diffusion dithering when copying a pixel image from one depth to a lesser depth and anti-aliasing when shrinking a pixel image) and it added quite a few more routines, mainly for system-level support for off-screen images. The 32-Bit QuickDraw file has been included with system software since system software version 6.0.5 and is built into the ROMs of the IIci, IIfx, LC, and IIsi. System software version 7.0 will have all its features built in. >Also, how is PICT-2 different from PICT-1? Opcodes in PICT-1 are eight bits wide. The worry was that 256 different opcodes might not be enough, so when the PICT format had to be updated to support color, the opcodes were made to be 16 bits wide, and the whole update was called PICT-2. PICT was known as PICT-1 from then on. For now, if you try to draw a PICT-2 on a Macintosh that doesn't support color, you'll get nothing. Starting with system software version 7.0, you can draw a PICT-2 on a black & white Macintosh and get a black & white representation of the picture. >Thanks in advance, > > >Narayan Sriranga Raja. -- Forrest Tanaka AppleLink: TANAKA Graphics/Toolbox Developer Technical Support Internet: ftanaka@apple.com Apple Computer, Inc. Phone: 408 974-1243