Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!agate!stanford.edu!lucid.com!campeau!jwz From: jwz@lucid.com (Jamie Zawinski) Newsgroups: comp.lang.postscript Subject: Re: reading image data Message-ID: Date: 21 Mar 91 23:14:59 GMT References: <21257@shlump.nac.dec.com> Sender: usenet@lucid.com Organization: Lucid, Inc., Menlo Park, CA Lines: 26 In-Reply-To: tatlow@dash.dlb5.dec.com's message of 19 Mar 91 21:53:43 GMT In article <21257@shlump.nac.dec.com> tatlow@dash.dlb5.dec.com (Tom Tatlow) wrote: > > Is there any way I can store all of the hex image data in a big array or > something and have the image procedure read it from there? Yes, like so: /foobar { gsave -0.5 -0.5 translate 82 71 1 [ 82 0 0 -71 0 71 ] %% bitmap data... pinhead representation (tm). {<000000000000000000003f000000000000000000003f000000000000000000003f00000000 ... ad nauseam ... 000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000>} image grestore } def But note that some on-screen PostScript interpreters have problems with extremely long literal strings, so this might not work there. It should work in all conforming PS implementations, though. -- Jamie