🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #343

Strange image bitshift

#343
From: Steve Beyer
Date: Sat, 25 Jul 1992 12:14
37 lines
1265 bytes
(--Please forgive if this is a reposting--)
Say I have an image operation like this:

/picstr 8 string def
278 200 4 [ 278 0 0 -200 0 200 ]
{ currentfile picstr readhexstring pop } image
. . . data . . .

Everything works fine.  But say I do this:

/picstr 8 string def
278 200 4 [ 278 0 0 -200 0 200 ]
{ currentfile picstr readhexstring pop
/place 0 def
{ picstr place 3 -1 roll put /place place 1 add def } forall }
picstr image
. . . data . . .

Or this:

/picstr 1 string def
278 200 4 [ 278 0 0 -200 0 200 ]
{ currentfile picstr readhexstring pop
0 get picstr 0 3 -1 roll put picstr } image
. . . data . . .

As far as I can tell, these changes should do nothing; but, when they are
added, the image is printed but *shifted* -- that is, if a line was, say,

AAAAAAAABBBBBBBBCCCCCCCC

it is now

AABBBBBBBBCCCCCCCCAAAAAA

I do not understand.  Any thoughts would be appreciated.  -- Steve
Technical Details
Message-ID: <Bry1zr.A93@well.sf.ca.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!pacbell.com!well!sbeyer

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!mips!pacbell.com!well!sbeyer
From: sbeyer@well.sf.ca.us (Steve Beyer)
Subject: Strange image bitshift
Message-ID: <Bry1zr.A93@well.sf.ca.us>
Sender: news@well.sf.ca.us
Organization: Whole Earth 'Lectronic Link
Date: Sat, 25 Jul 1992 12:14:14 GMT
Lines: 38