Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!wiml From: wiml@milton.u.washington.edu (William Lewis) Newsgroups: comp.lang.postscript Subject: RLE sampled-image compression Summary: Use setdash? Message-ID: <7320@milton.u.washington.edu> Date: 11 Sep 90 00:26:50 GMT Organization: University of Washington, Seattle Lines: 32 It seems that one of the periodic, recurring discussions in this newsgroup is the "Gee, I wish I could compress my bitmaps so they didn't take so long to transmit, but then it takes too long to decompress them" discussion. Last time this came around I had an idea; I still haven't gotten around to actually *trying* it yet, so I thought I'd post it to the net and see if anyone else has thought similarly. The idea is basically to use RLE compression and use the builtin RLE decompressor in the dashed-line functions. Obviously, for images with a lot of short runs, this wouldn't work: only for images with average runs of 16 pixels or more, I think. Still, for many images, this is quite acceptable. A standard decompression might go like this: [ [ 0 1 12 36 14 12 7 9 3 16 ] [ 32 1 0 1 2 32 4 53 2 11 18 ] [ 1 2 3 1 2 3 1 12 12 18 16 1 12 19 1 0 43] ... ] { 0 setdash 0 0 moveto 30 30 lineto stroke } bind forall ...assuming I've not left out anything obvious. This would be equivalent to the "imagemask" operator; things would have to be whitefilled first and multiple colors/grays done separated and done in several passes... Has this been done before? Does it look like it would be practically useful (given a reasonably intelligent bitmap-to-"rle-eps" convertor)? Comments? Implementations? =8) -- wiml@milton.acs.washington.edu Seattle, Washington | No sig under (William Lewis) | 47 41' 15" N 122 42' 58" W |||||||| construction