is there a unix command/utility that will allow me to print
jpg's and gif's. Our printers support postscript and raster.
I'm currently in the position where I need to be able to print large
(8-24MB) color pictures for a client on an Epson Stylus Color from my SPARC
5, SunOS5.4 box. While I do have a working solution, it seems kludgy (and
extremely slow & inefficient) and I'd like to come up with something better.
The pics are in (Mac) .pict format on CD-ROMs. There is a driver for an
"Epson 2500+color", which Epson claims is compatible with my Stylus Color.
However, Epson was unhelpful past that point, and Sun support was an equally
My solution is as follows:
for file in *.pct
echo $file | lp -s # print the filename on the page
picttoppm -fullres $file 2> /dev/null | pnmtops -scale 0.25 - \
2> /dev/null | \
gs -q -dSAFER -sDEVICE=stcolor -dOutputCode=20 -dNOPAUSE \
-sOutputFile=\|'lp -s -n 2' -
Picttoppm wants to invoke pnmscale on the image and shrink it by a factor
of approximately 11 times, so I found it necessary to use the -fullres
option beforehand to retain the resolution; this isn't really a problem.
The only thing I could find that would speak the printer's language was a
GhostScript driver (it's not a postscript printer, obviously), so I convert
the pic to ps and then use gs to convert it into whatever this printer
speaks. The latter step is what's killing me performance-wise in this
venture. Timing is roughly (for an 8MB orig):
The printer is capable (at the quality level I need) of printing a page in
~2 mins. Since I'm doing 2 copies of each, performance tuning beyond the 4
min mark is useless except for filling up my spool directory. However,
getting to the 4 min mark would cut my total printing time in half. In
addition, while picttoppm and pnmtops aren't bad CPU hogs, gs is.
The solution I'd really like to find is one that bypasses the Postscript
step entirely, translating from a .pct stright to something the printer
understands. As I mentioned, there *is* a driver for said printer, but no
amount of fiddling with lpadmin and lpfilter has gotten me anywhere.
Any help, pointers, or pats on the back would be greatly appreciated...
Quis custodiet ipsos custodes?
13. Background Pics?