Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ukma!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpgrla!paulc From: paulc@hpgrla.HP.COM (@Paul Charlton) Newsgroups: comp.graphics Subject: Re: GIF file format Message-ID: <4180015@hpgrla.HP.COM> Date: 7 Feb 89 16:11:35 GMT References: <1125@media.UUCP> Organization: Hewlett-Packard, Greeley, CO Lines: 21 > Unfortunately, the document does not specify anywhere what is meant by >"Color Resolution." It does not appear to mean what comes to mind, i. e. >color resolution of 0 implying 2 ** 1 colors, 1 meaning 2 ** 2 ... >This poses no problem in reading a GIF file, as all necessary information is >provided elsewhere but it remains unclear what value to enter into this >field when writing out an image. > >I would appreciate any clarification I can get. "pixel + 1" is the number of bits used as a palette index ie: if (pixel == 4), the picture uses 32 colors. the "color resolution" is an indication of how many bits are in each palette slot, for 24 bit color, the "color resolution" is (8 - 1) = 7 for 12 bit color, the "color resolution" is (4 - 1 ) = 3 PaulC { paulc@hpgrai.hp.com } | { hplabs!hpgrai!paulc }