[comp.lang.postscript] sun screendumps?

br@wucs1.wustl.edu (Bill Ross) (01/16/90)

I am attempting to dump sun monochrome screens to my apple
laserwriter.  I have a postscript program that works fine for 
smaller raster files but goofs up for big ones.   It prints
the top half of the desired image twice and omits the
bottom of the image entirely.  Here is how I am doing it:

%!
18 12 translate
576 450 scale
1152 900 1
[ 1152 0 0 -900 0 900 ]
{ <
000000000000000000000000000000000003777777777777774003777777777777
		:
		: 259200 characters of hex data
		:
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
> }
image
showpage


What am I doing wrong?  Is it impossible to dump an image
this large because of memory usage?  It is really only
a 128k image...   Please respond by mail to br@wucs1.wustl.edu.
Thanks!
Bill  Ross

Bill Ross 	Washington University ECL,  St. Louis 314-889-5894
INTERNET:	br@wucs1.wustl.edu
UUCP:		uunet!wucs1.wustl.edu!br

henry@angel.Sun.COM (Henry McGilton -- Software Products) (01/17/90)

In article <1990Jan16.133504.11654@cec1.wustl.edu>, br@wucs1.wustl.edu (Bill Ross) writes:
    *  I am attempting to dump sun monochrome screens to my apple
    *  laserwriter.  I have a postscript program that works fine for 
    *  smaller raster files but goofs up for big ones.   It prints
    *  the top half of the desired image twice and omits the
    *  bottom of the image entirely.  Here is how I am doing it:

    *  %!
    *  18 12 translate
    *  576 450 scale
    *  1152 900 1
    *  [ 1152 0 0 -900 0 900 ]
    *  { <
    *  000000000000000000000000000000000003777777777777774003777777777777
		    :
		    : 259200 characters of hex data
		    :
    *  dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
    *  > }
    *  image
    *  showpage

The maximum length of a string introduced by the < ... > notation
is 65535 characters.  See Red Book, page 260.  See Blue Book, page
114, for a method of doing the job correctly.

	.......... Henry
+-------------------+---------------------------+---------------------------+
| Henry McGilton    | I'll bet those people who |                           |
| Sun Microsystems  | put control-D characters  | arpa: hmcgilton@sun.com   |
| 2550 Garcia       | in PostScript files also  | uucp: ...!sun!angel!henry |

mleisher@nmsu.edu (Mark Leisher) (01/19/90)

/usr/local/pssun on Suns dumps a saved rasterfile into postscript.
Look at pixrect stuff for dumping the screen to disk.

void gnus::signature();

rahardj@ccu.umanitoba.ca (B. Rahardjo) (01/20/90)

In article mleisher@nmsu.edu (Mark Leisher) writes:
>/usr/local/pssun on Suns dumps a saved rasterfile into postscript.
>Look at pixrect stuff for dumping the screen to disk.

Hmm, I couldn't find that program on our system..... 
I guess it is a local program on your system. 
Could you mail me the source code ? or the executable ?

We have 4 rasterfile -> ps ... none of them works as I espected.
(too slow, 45 minutes) (can't print the postscript, offending commands)
on the old Laser Writter.
Maybe I have to write my own :-(

thanks,
Budi
-- 
Budi Rahardjo        | rahardj@ccu.UManitoba.CA
Electrical Eng.      | rahardj@ccm.UManitoba.CA
U. of Manitoba       | rahard@ee.UManitoba.CA
Winnipeg, Manitoba, Canada - R3T 2N2

merlyn@iwarp.intel.com (Randal Schwartz) (01/22/90)

In article <1990Jan20.143629.20609@ccu.umanitoba.ca>, rahardj@ccu (B. Rahardjo) writes:
| In article mleisher@nmsu.edu (Mark Leisher) writes:
| >/usr/local/pssun on Suns dumps a saved rasterfile into postscript.
| >Look at pixrect stuff for dumping the screen to disk.
| 
| Hmm, I couldn't find that program on our system..... 
| I guess it is a local program on your system. 
| Could you mail me the source code ? or the executable ?
| 
| We have 4 rasterfile -> ps ... none of them works as I espected.
| (too slow, 45 minutes) (can't print the postscript, offending commands)
| on the old Laser Writter.
| Maybe I have to write my own :-(

Get the pbmplus public-domain archive (see comp.archives for info
about where it is).  On my b/w Sun 3/75, I type:

screendump | rasttopbm | pnmflip -cw | pgmtops -s 0.67 | lpr -Ppost

to get a screendump on the Postscript printer.  (It looks like a slow
dog, but the processes are all pretty lightweight.)

It handles color-rasts to postscript too, with commandlines like:

[color-screendump] | rasttoppm | ppmtopgm | pgmtops -s n.nn | lpr -Ppost

It's pretty neat.  I've been using it to convert gif's to postscript.

Just another Postscript hacker,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III  |
| merlyn@iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn                |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/

vjg@cbnews.ATT.COM (vincent.j.guinto) (01/23/90)

In article <1990Jan20.143629.20609@ccu.umanitoba.ca> rahardj@ccu.UManitoba.CA (B. Rahardjo) writes:
>In article mleisher@nmsu.edu (Mark Leisher) writes:
>>/usr/local/pssun on Suns dumps a saved rasterfile into postscript.
>>Look at pixrect stuff for dumping the screen to disk.
>
>Hmm, I couldn't find that program on our system..... 
>I guess it is a local program on your system. 
>Could you mail me the source code ? or the executable ?
>
>We have 4 rasterfile -> ps ... none of them works as I espected.
>(too slow, 45 minutes) (can't print the postscript, offending commands)
>on the old Laser Writter.
>Maybe I have to write my own :-(
>
>thanks,
>Budi
>-- 


I fit both sides of this: I've used pssun to convert screendumps
to PostScript on Sun OS 3.<something>, with great results - 
the PostScript output can be used for other purposes with a
negligible amount of tweaking.

However, I now want to do the same with newer Sun OS (4.<something>),
and apparently the pssun utility is no longer available. Other
approaches haven't panned out, because the PostScript generated
has problems that make it unusable in my other applications.

I would love to have someone tell me where to find a
pssun-equivalent program that will run on SPARC stations using
the newer Sun OS versions. By equivalent, I mean EXACTLY
equivalent!!!

Any ideas? 

Sorry I can't be more exact about the OS versions I'm talking 
about; I don't have access to either system right now.
I do know that the old one (with pssun) started 3.<something>,
while the new one (without pssun) is 4.<something>. The
hardware has upgraded, too, from a 3/60 to a SPARC station.

I would appreciate any help!


----------------------------------------------------------
Vince Guinto                                 att!cblph!vjg
AT&T Bell Laboratories
Columbus, OH