Path: utzoo!utgpu!water!watmath!watdcsu!mgardi From: mgardi@watdcsu.waterloo.edu (M.Gardi - ICR) Newsgroups: comp.binaries.ibm.pc Subject: Re: GIF pictures Message-ID: <4577@watdcsu.waterloo.edu> Date: 29 Mar 88 00:14:23 GMT References: <2851@omepd> <6870002@hpcvca.HP.COM> Reply-To: mgardi@watdcsu.waterloo.edu (M.Gardi - ICR) Organization: U. of Waterloo, Ontario Lines: 23 In article <6870002@hpcvca.HP.COM> scott@hpcvca.HP.COM (Scott Linn) writes: >Regarding these GIF pictures... > >Does anyone have a "good" algorithm (or at least a start on one) that will >convert a 256-color palette down to two (black/white)? I know that this >has been done (for the Mac GIF reader), but I have been unable to find any >sources. > >Thanks, > >Scott Linn >HP - Northwest IC Division I have written a GIF decoder for the monochrome ST which basically calculates a 'darkness' factor for each of the colours in the palette (R + G + B) / 3 Each time I want to plot a pixel I throw a 256-sided die. If the number is greater than the 'darkness', I plot a white pixel, if it is less, I plot a dark pixel. The resulting image is generally pretty good, though it is no substitute for colour. I will probably post my GIF decoder sometime in the future (as soon as I make it fast). David Rowley ...watmath!watdcsu!mgardi