🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5111

Re: reading image data

#5111
From: Jamie Zawinski
Date: Thu, 21 Mar 1991 23:14
26 lines
1365 bytes
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
Technical Details
Message-ID: <JWZ.91Mar21151459@thalidomide.lucid.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!agate!stanford.edu!lucid.com!campeau!jwz
References: <21257@shlump.nac.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <JWZ.91Mar21151459@thalidomide.lucid.com>
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