Xref: utzoo comp.graphics:17179 comp.compression:317 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!unhd.unh.edu!msel.unh.edu!rg From: rg@msel.unh.edu (Roger Gonzalez) Newsgroups: comp.graphics,comp.compression Subject: Re: gif encoding questions Message-ID: <1991Apr11.213950.16265@unhd.unh.edu> Date: 11 Apr 91 21:39:50 GMT References: <1991Apr9.142255.186@unhd.unh.edu> <1991Apr10.095103.26252@ukpoit.co.uk> Sender: usenet@unhd.unh.edu (USENET News System) Organization: UNH Marine Systems Engineering Laboratory Lines: 41 Nntp-Posting-Host: msel.unh.edu >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 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. 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! 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'm really close.. I get one good scan line out (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