🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1361

readstring vs. readhexstring in images

#1361
From: K. Glen Newton
Date: Thu, 23 Nov 1989 03:52
50 lines
1911 bytes
i'm having a little bit of a problem with printing 8 bit raster
images. I have some code which works right now, but it uses
"readhexstring"  and needs to have hex as input. This is fine except
that the files produced are twice as large as the original character
coded image. Here is the working header (which i got from somewhere?):

%!
currentscreen /proc exch def /angle exch def /frequency exch def
/angle 90 def /frequency 60 def
frequency angle /proc load setscreen
/picstr 313 string def
/screen {313 140 8 [313 0 0 -140 0 140]
   {currentfile picstr readhexstring pop} image} def
451 72 translate 90 rotate 648 290 scale screen

3c484b4e4e514a4c4c5154545557564f42424e4f3f3339373d3d383a3d3a3c3f3d36363e3f3d3f42....etc....


I thought that if i just replaced the readhexstring with readstring
and used chars, things would work out fine. But my laser printer does
not like it when it is sent these files and does nothing... here is
the modified header:

%!
currentscreen /proc exch def /angle exch def /frequency exch def
/angle 90 def /frequency 60 def
frequency angle /proc load setscreen
/picstr 313 string def
/screen {313 140 8 [313 0 0 -140 0 140]
   {currentfile picstr readstring pop} image} def
451 72 translate 90 rotate 648 290 scale screen

<HKNNQJLLQTTUWVOBBNO?397==8:=:<?=66>?=?B ....etc....



can anyone tell me what is going wrong??

by the way, i am using a QMS 810 which hasn't given us any trouble before..



			thanks,

			glen newton
			
			knewton@mycologue.waterloo.ca
--
******************************************dhfg
Technical Details
Message-ID: <12406@watcgl.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watmath!watcgl!watsup!knewton

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watmath!watcgl!watsup!knewton
From: knewton@watsup.waterloo.edu (K. Glen Newton)
Newsgroups: comp.lang.postscript
Subject: readstring vs. readhexstring  in images
Message-ID: <12406@watcgl.waterloo.edu>
Date: 23 Nov 89 03:52:08 GMT
Sender: daemon@watcgl.waterloo.edu
Lines: 50