Xref: utzoo comp.graphics:4359 comp.sys.ibm.pc:24167 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!pitstop!sundc!seismo!uunet!cos!hqda-ai!media!ian From: ian@media.UUCP (Ian Poynter) Newsgroups: comp.graphics,comp.sys.ibm.pc Subject: GIF file format Keywords: GIF Message-ID: <1125@media.UUCP> Date: 3 Feb 89 20:59:24 GMT Reply-To: ian@media (Ian Poynter) Followup-To: comp.graphics Distribution: na Organization: Media Cybernetics, Inc. Lines: 47 I have been asked by someone in our company who does not have access to news to post this question. Please direct all responses either to me by e-mail or to comp.graphics, since I don't read comp.sys.ibm.pc. Thanks. The following is an excerpt from the GIF image format specification: SCREEN DESCRIPTOR The Screen Descriptor describes the overall parameters for all GIF images following. It defines the overall dimensions of the image space or logical screen required, the existence of color mapping information, background screen color, and color depth information. This information is stored in a series of 8-bit bytes as described below. bits 7 6 5 4 3 2 1 0 Byte # +---------------+ | | 1 +-Screen Width -+ Raster width in pixels (LSB first) | | 2 +---------------+ | | 3 +-Screen Height-+ Raster height in pixels (LSB first) | | 4 +-+-----+-+-----+ M = 1, Global color map follows Descriptor |M| cr |0|pixel| 5 cr+1 = # bits of color resolution +-+-----+-+-----+ pixel+1 = # bits/pixel in image | background | 6 background=Color index of screen background +---------------+ (color is defined from the Global color |0 0 0 0 0 0 0 0| 7 map or default map if none specified) +---------------+ 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. -- Ian (I answer *all* mail) Poynter Phone: +1 (301) 495-3305 UUCP: ..!{mimsy,sundc}!{prometheus,hqda-ai}!media!ian Internet: (new) ian%media@pentagon-ai.army.mil (but too new to work?) (old) ian%media@hqda-ai.arpa (going away real soon now)