W2H: troubleshooting tips for PS to GIF conversion


Here is a description how you can redo in a shell the conversion steps W2H is doing:

  1. create a postscript file:
    • GCG environment:
      start a shell with a GCG session
      % postscript ColorScript-100 out.ps
      % plottest -default
      Now you should have a color postscript file (out.ps).
    • EMBOSS environment:
      create a postscript (PS) output with an EMBOSS application
      (e.g. plotorf -graph=ps -goutfile=out)
      Now you should have a postscript file (out.ps).
  2. % which gs
    Is this the same gs you're using for W2H ($PATH variable)?
  3. % gs -q -sDEVICE=ppmraw -r100 -dNOPAUSE -sOutputFile=- - < out.ps > out.ppm
    This converts the postscript file into a 100 DPI PPM file.
  4. Display this PPM file, using a viewer like:
    % xv out.ppm
    or
    % display out.ppm
  5. % which convert
    Is this the same convert you've configured in W2H's Cfg.pl ($PSCONVERT)?
  6. % convert -rotate 270 PPM:- GIF:- < out.ppm > out.gif
    This converts the PPM file into a GIF file.
  7. Display this GIF file, using a viewer like:
    % xv out.gif
  8. And now do the 2 conversion steps in one go:
    % convert -rotate 270 -density 100 PS:- GIF:- < out.ps > out2.gif
    This converts the PS file via a temporary PPM file into a GIF file.
  9. Display this GIF file, using a viewer like:
    % xv out2.gif


Peter Ernst
Last modified: Fri Jan 19 17:56:42 2001