Xref: utzoo alt.graphics.pixutils:1009 comp.graphics:17357 Path: utzoo!utgpu!cs.utexas.edu!sdd.hp.com!caen!math.lsa.umich.edu!sharkey!news.iastate.edu!cs442a07 From: cs442a07@cs.iastate.edu (Sunny the Great) Newsgroups: alt.graphics.pixutils,comp.graphics Subject: Re: Gif picture re-ordering (CLARIFICATION) Message-ID: Date: 19 Apr 91 12:35:30 GMT References: Sender: news@news.iastate.edu (USENET News System) Reply-To: cs442a07@zippy.cs.iastate.edu Organization: Iowa State University, Ames IA Lines: 60 cs442a07@cs.iastate.edu (Sunny the Great) writes: I thought I had better clarify what I meant.... >I would like to find a utility (PC-based or C-source) which takes a gif >file, and converts it in the following fashion: ------------- Actually it can be any kind of picture >The color numbers are re-ordered so that near-to-each-other pixels are >near to each other in color number; More on this below >and The picture is re-compressed using thefollowing ordering of pixels: >---------> >^------->| >|^----->|| >|<------v| ><--------v >(Hopefully making the compression more efficient... >If such an option exists in PBMPLUS, then which option is it, and where can >I find a pre-compiled for IBM PC version of PBMPLUS? ----- begin clarification Its simple really - I want the picture to be a little more compressible than it normally is... I should have mentioned that it could be any picture, not a gif file. If you take the pixels in the order given previously, then there is no "jump" as we go from one scan line to another... this smooth transition (to my mind) means a better chance to compress this picture. As for re-ordering the color numbers, if we have a stream of colors which looks like this: 05243671 and the colors (on the screen) are a red to Yellow progression, then we define new color 1=old color 5, new 2= old 2, new 3=old 4 etc so that we get 01234567 (which still looks the same) makes it more compressible, if only the differences between p(x) and p(x+1) are stored. (I think. I am by no means even an amateur). Basically, re-order the elements so that the average difference between x and x+1 is minimized. Reason why: I intend to have lots of picfiles. While GIFs do a good job compressing the pictures, if the pictures are decompressed, translated as above and then recompressed (with PKZIP or ARJ or LHARC or whatever) I might be able to save space... even 5% is welcomed. -- Sunjeev "Sunny" Gulati, student, Iowa State University cs442a07@zippy.cs.iastate.edu taa65@ccvax.iastate.edu (515)-296-9537 "I have nothing better to do than procrastinate" - Myself