Article View: comp.sys.mac
Article #32701Re: PostScript run-length encoding (again)
From: Geof Cooper
Date: Thu, 29 Sep 1988 18:47
Date: Thu, 29 Sep 1988 18:47
15 lines
1183 bytes
1183 bytes
The "frame maker" postscript driver does something like this. What they do is to encode an image as a single byte of command followed by N bytes of argument. The "image" procedure reads the first byte and looks it up in a table of procedures, then executes the procedure, which must consume the "right" amount of input (maybe they have a length field in there too). The procedures do things like replicate a given 8-bit pattern, fill in with zeros, fill in with ones, etc.. The processing time for this is a few percent slower for the interpreter overhead, but most images spend all their time scaling the image, so it isn't too signficant. This kind of compression can help a LOT if an image has significant regions of constant gray (can you say "margins" boys and girls?). Have fun,
Technical Details
Message-ID:
<1933@imagen.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!decwrl!sun!imagen!daemonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!decwrl!sun!imagen!daemon From: geof@apolling (Geof Cooper) Newsgroups: comp.sys.mac,comp.sys.mac.programmer,comp.lang.postscript Subject: Re: PostScript run-length encoding (again) Message-ID: <1933@imagen.UUCP> Date: 29 Sep 88 18:47:03 GMT Sender: daemon@imagen.UUCP Lines: 15