prettying up PostScript - re-post

Mark P. Line markline at henson.cc.wwu.edu
Fri Apr 8 19:11:24 EDT 1994


On Fri, 8 Apr 1994, Simon Cox wrote:

> However, sometimes, it seems rather laborious
> to put all the required annotation on through fiddling with
> a ps.map script.  What would be nice is to generate the basic
> output with the geographically critical elements included with
> ps.map, and then add an extra layer of annotation in some more
> friendly wysiwyg application, like some drawing or painting package
> on a Mac or PC.

If by 'PC' you mean MS-Windows, I can't help you. If you're willing to
stick to Unix for this, you can do what you want with ImageMagick. Here's
an excerpt from the ImageMagick README-file:

--------------------------- included material -------------------------

AVAILABLILITY

  Anonymous FTP at ftp.x.org, file contrib/ImageMagick2.3.4.tar.Z.


UNIX COMPILATION

  The ImageMagick utilites read and write MIFF images.  Refer to the
  end of this message for more information about MIFF.  Use `convert'
  to convert images to and from the MIFF format.

  Some ImageMagick utilities recognizes these image formats:

       Tag       Description
       ----------------------------------------------------
       AVS       AVS X image file
       BMP       Microsoft Windows bitmap image file
       EPS       Adobe Encapsulated Postscript
       GIF       Compuserve Graphics image file
       JPEG
       PCX       ZSoft IBM PC Paintbrush file
       PICT      Apple Macintosh QuickDraw/PICT file
       PNM       Portable bitmap
       PS        Adobe PostScript file
       RLE       Utah Raster Toolkit
       SUN       SUN raster
       TGA       Truevision Targa image file
       TIFF      Tagged Image File Format
       VICAR
       VIFF      Khoros Visualization image file.
       XBM       X11 bitmap
       XWD       X11 window dump

  and for your convenience automatically converts the alien image
  format to MIFF at execution time.  However, the MIFF image format has
  several advantages over most image formats (i.e. runlength encoding,
  digital signature on an image colormap, etc.).  ImageMagick is
  designed to exploit these advantages.  Whenever possible convert an
  alien image format to the MIFF format before using the various
  ImageMagick programs.

  Other formats are also recognized.  See CONVERT(1) for a list of
  valid image formats.  You can specify a particular image format by
  prefixing the image filename with the image type and a colon (i.e.
  ps:image.ps).


ANIMATION

  An example animation sequence is available from anonymous FTP at
  ftp.x.org, file contrib/ImageMagick.animation.tar.Z Or
  alternatively, you can create this sequence yourself.  Just look at
  README in the scenes directory.


MIFF IMAGE FORMAT

  MIFF is an image format which I developed.  I like it because it

    1) It is machine independant.  It can be read on virtually any
       computer.  No byte swapping is necessary.

    2) It has a text header.  Most image formats are coded in binary
       and you cannot easily tell attributes about the image.  Use
       'more' on MIFF image files and the attributes are displayed in
       text form.

    3) It can handle runlength-encoded images.  Although most scanned
       images do not benefit from runlength-encoding, most
       computer-generated images do.  Images of mostly uniform colors
       have a high compression ratio and therefore take up less memory
       and disk space.

--------------- end of included material ------------------------------

As to your question about PostScript annotations, the ImageMagick display
command will let you enter annotations on-screen in any X-fonts (up to 9
per file, I think) or colors.

> btw, I do NOT want to convert the thing to a raster, as I like the high
> quality lines and text that you get from ps.map, which I do not
> think are available from GRASS in any other way.

If you don't want to convert the thing to a raster, then you need a
plotter, not a printer and a PostScript interpreter. Otherwise, it's just
a matter of resolution, isn't it? Give ImageMagick a try and see if the
output is not satisfactory.

Maybe somebody has the disk space to play around with ImageMagick
animation routines. Seems like there's a lot of potential for animated
visualization of GRASS layers here.

-- Mark

--------------------------------------------------------------------
Mark P. Line                       Phone: +1-206-733-6040
Open Pathways                        Fax: +1-206-733-6040
P.O. Box F                         Email: markline at henson.cc.wwu.edu
Bellingham, WA 98227-0296
--------------------------------------------------------------------





More information about the grass-user mailing list