Xref: utzoo comp.graphics:17215 comp.compression:333 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uwm.edu!bionet!agate!ucbvax!bloom-beacon!eru!hagbard!sunic!liuida!isy!lysator.liu.se!zap From: zap@lysator.liu.se (Zap Andersson) Newsgroups: comp.graphics,comp.compression Subject: Re: gif encoding questions Message-ID: <577@lysator.liu.se> Date: 12 Apr 91 12:46:36 GMT References: <1991Apr9.142255.186@unhd.unh.edu> <1991Apr10.095103.26252@ukpoit.co.uk> <1991Apr11.213950.16265@unhd.unh.edu> Sender: news@isy.liu.se (Lord of the News) Organization: Lysator Computer Club, Linkoping University, Sweden Lines: 77 rg@msel.unh.edu (Roger Gonzalez) writes: >>In article <1991Apr9.142255.186@unhd.unh.edu> I write: >>>Why have I seen gray scale (256) GIFs that don't have simple color maps like >>>00 00 00 01 01 01 02 02 02 03 03 03 ... FE FE FE FF FF FF >>> >>>Some of them are really strange... >But what I meant was: >When looking at grayscale 256 GIFs, I would expect >>>00 00 00 01 01 01 02 02 02 03 03 03 ... FE FE FE FF FF FF >but have seen (in ppmtogif results, for example) >000000 47-49-46-38-37-61-00-02 00-02-E7-00-00-00-00-00 GIF87a@B@B.@@@@@ >000010 C9-C9-C9-8F-8F-8F-55-55 55-1B-1B-1B-E4-E4-E4-AA ......UUU[[[.... >000020 AA-AA-70-70-70-36-36-36 FF-FF-FF-C5-C5-C5-8B-8B ..ppp666........ >000030 8B-51-51-51-17-17-17-E0 E0-E0-A6-A6-A6-6C-6C-6C .QQQWWW......lll >000040 32-32-32-FB-FB-FB-C1-C1 C1-87-87-87-4D-4D-4D-13 222.........MMMS Guess (from looking in my own code to a similar hack) is that they created a palette entry when they needed one, i.e. the palette-builder was unaware that the image ewwas goung to be a grayscale thing, but entered things into the palette when they were needed, just like my program does. (However, my program KNOWS when it's suppose to use gfrayscale if I tell it too). >And I was wondering why the screwy ordering. Sorry if I wasn't clear. >I've been trying to reverse engineer what my problems are with my >encoder by comparing my output with the results of rawtopgm | ppmtogif, >but my comparison can only go so far before I hit a root code that >is different that mine because their greyscale map is different. Would you like a DEcoder? I could easily mail one to you and help you sort this out. SOMWHERE I have an encoder too, but dunno where :-( >Why am I writing my own encoder when I could swipe code from everyone else? >'Cause I'm a masochist. So what if its a memory pig, I don't use hashing >yet, and its slower than shit? I'm having fun! SOunds like a sound mind in an unsound body :-) >If you are equally masochistic, and would like to give me a hand, my >almost-but-not-quite encoder is on msel.unh.edu in /pub/gif for ftp-ing. I enjoy better being SADISTIC (so we form a matching pair :-) so I will MAIL you de encoders as soon as I find it. Har har har. I>I'm really close.. I get one good scan line ou t (using VUIMAGE on a >PC), and then a shitty scan line, and then it stops. I think it barfs >because I don't change bit sizes where it expects me to. Sigh. >-Roger >-- >"The question of whether a computer can think is no more interesting > than the question of whether a submarine can swim" - Edsgar W. Dijkstra >rg@[msel|unhd].unh.edu | UNH Marine Systems Engineering Laboratory >r_gonzalez@unhh.bitnet | Durham, NH 03824-3525 THAT was a true statement indeed! -- * * * * * * * * * * * * * * * * * (This rent for space) * My signature is smaller than * Be warned! The letter 'Z' is Copyright 1991 * yours! - zap@lysator.liu.se * by Zap Inc. So are the colors Red, Green and * * * * * * * * * * * * * * * * * Greenish-yellow (Blue was taken by IBM) -- * * * * * * * * * * * * * * * * * (This rent for space) * My signature is smaller than * Be warned! The letter 'Z' is Copyright 1991 * yours! - zap@lysator.liu.se * by Zap Inc. So are the colors Red, Green and * * * * * * * * * * * * * * * * * Greenish-yellow (Blue was taken by IBM)