csw@ulysses.homer.nj.att.com (Chris Warth) (03/31/88)
Running NeWS version 1.1. Adobe specifies that `currentfile' "returns the file object from which the PostScript interpreter is currently or was most recently reading program input" (Red book, pg. 144). Yet this does not seem to work for psh or psview. Most commonly this seems to be used to read large bitmaps for the image operator. In fact, it seems one of the only ways the read images that are larger than about 65000 bytes, the maximum length of a string. There are workarounds, I think, for this particular application, but it would sure be nice to be able to run normal postscript programs without hacking the code so much. Is this a bug that I should report or is there some reason this cannot work in NeWS? In the mean time, does anyone have a nice way to handle bitmaps that are larger than 65000 bytes? Chris Warth ATT Ball Laboratories Murray Hill NJ ulysses!csw --
sjs@spectral.ctt.bellcore.com (Stan Switzer) (04/01/88)
In article <10204@ulysses.homer.nj.att.com> csw@ulysses.homer.nj.att.com (Chris Warth) writes: > > Running NeWS version 1.1. > > Adobe specifies that `currentfile' "returns the file object from > which the PostScript interpreter is currently or was most recently > reading program input" (Red book, pg. 144). Yet this does not seem > to work for psh or psview. I still don't have 1.1, but in 1.0, currentfile does indeed work. It cannot work with the distributed psview, however, because psview wraps your input inside of an enveloping PostScript program. With a bit of work, you can modify psview to read the file directly. This has the added advantage that you can do semi-interactive PostScript hacking: just modify the input file and invoke redraw. (You might also do something ugly like change the close gizmo into a redraw gizmo.) For extra credit, modify psview to maintain an 8.5 X 11 aspect ratio when resized. Stan Switzer sjs@ctt.bellcore.com