🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #314

Odd bitshifts with image

#314
From: Steve Beyer
Date: Thu, 23 Jul 1992 11:59
71 lines
1327 bytes
c:\telix\upload\image.txt
ay 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: <BruByK.60G@well.sf.ca.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!pacbell.com!well!sbeyer

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!pacbell.com!well!sbeyer
From: sbeyer@well.sf.ca.us (Steve Beyer)
Subject: Odd bitshifts with image
Message-ID: <BruByK.60G@well.sf.ca.us>
Sender: news@well.sf.ca.us
Organization: Whole Earth 'Lectronic Link
Date: Thu, 23 Jul 1992 11:59:07 GMT
Lines: 73