paint drivers

Darrell McCauley mccauley at ecn.purdue.edu
Mon Nov 2 05:43:48 EST 1992


> From: mark at cres1.anu.edu.au (Mark Greenaway)
> Sender: lists-owner at max.cecer.army.mil
> To: grassu-list at max.cecer.army.mil
> Subject: paint drivers
> Date: Mon, 2 Nov 92 15:50:46 EST
> 
> Does anyone out there have any drivers for paint that use compression.
> I was thinking of TIFF or whatever.
> 	The reason is when I create an A3 300 dpi ppm image the file size
> is in excess of 50Mb.  I then convert it to PCL and print it out on our
> HP PaintJet XL300. 
> 	If I could get a driver for TIFF it would mean that the files
> would be a lot smaller and my printer can print TIFF files with minor 
> modifications.
> 
> Mark Greenaway                            ___  /\  Telephone: +61 6 249 4668

I. if you can deal with an intermediate file of 50 MB, what about the
libtiff stuff that is with pbmplus?

II. If you are running a sun, I can think of at least one trick:
 1. make $HOME/paint.ppm a named pipe (see mknod(8)) and
 2. write a daemon which 
    a. watches this,
    b. automagically converts ppm to pcl, and
    c. sends the output to the printer.
This way, there are no intermediate files. The daemon should be run
on the machine which you are running grass on.

<warning: trying this without a decent knowledge of unix/C could
          be a real time-burner. I can send you some code to
          get you started, if you like.>

III. Another idea would be to extend/fool the ppm driver so that instead
     of writing ppm directly to a file, it could write it to stdout.
     (Is this already possible? I've never tried.)
     This way you could pipe the output to compress or ppmtowhatever.
     Perhaps some trickery with the environment variable MAPLP
     might work, or could be made to work, to do this. E.g.,

     setenv MAPLP stdout	% ppm is written to stdout
     setenv MAPLP "| compress > $HOME/paint.ppm.Z"	
     setenv MAPLP "| ppmtowhatever | ... | lpr -Phppjxl


Hopefully, though, after I've thrown these ideas out, someone
will have a much simpler solution.  Anyone?

--Darrell



More information about the grass-user mailing list