[Thread Prev][Thread Next][Index]

Re: [ferret_users] Fwd: ps file to gif or png or jpg



Xueli and Hein,

| 1)   use ps2eps to create a proper eps file:
| 
|      cat ferret_output.ps | ps2eps -B > ferret_output.eps
|      convert ferret_output.eps ferret_output.png
[. . .]
| 3)   There are other tools such as eps2eps and psfixbb.  I don't use
|      those anymore but they may work for you.

Not claiming it is better or worse, I use ps2epsi or epstool:

  $ ps2epsi ferret_output.ps  # Produces ferret_output.epsi

or

  $ cat ferret_output.ps \
    | (echo '%!PS-Adobe-3.0 EPSF-3.0'; tail -n +2 ) > tmpfile.eps
  $ epstool --copy --quiet --output ferret_output.eps -b tmpfile.eps
  $ rm tmpfile.eps

Sometimes one or the other fails to correctly set the
BoundingBox.  I don't know why.

I suppose all or most of these tools use gs internally so all
differences probably come from the options given to gs.

[Irrelevant joke ahead.]
By the way, Unix commands aren't as consistent nowadays as before
so the "Useless Use of cat" award

  http://partmaps.org/era/unix/award.html

is less relevant, but ps2eps accepts filename as arguments, and

  $ ps2eps -B ferret_output.ps

produces ferret_output.eps .  No offense intended. :-)

Regards,
Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement