Re: Rescale ncgms without regenerating them?

From: Andrew Mai (mai AT XXXXXX)
Date: Fri Nov 02 2001 - 20:13:14 MST

  • Next message: Fred Clare: "Rescale ncgms"

    Steve,

    The easiest way to get what you want (I'm going way out on limb by
    contradicting Fred Clare here) is to translate the ncgm file to
    PostScript using one of the ps graphcaps and then use my psfm utility to
    re-format the PostScript file. Ordinarily this would be nearly
    impossible, but the very simple form of the PostScript produced by, say,

    % ctrans -d ps.mono gmeta > gmeta.ps

    makes it possible to change the scaling and positioning of individual
    frames (PostScript pages) and remove some of the PostScript "showpage"
    commands to put multiple frames on one page. This is what psfm does.
    It's just a simple Perl script which operates on gmeta.ps and produces a
    very similar file (called gmeta_PSFM.ps) with the desired
    re-formatting. The psfm command takes one argument -- the name of a
    description file which contains, for example, the following six lines:

    gmeta.ps
    4
    5.000 2.125 8.000
    5.000 6.375 8.000
    5.000 2.125 3.000
    5.000 6.375 3.000

    The first line is the name of the PostScript file. This must be a file
    that was generated as in the above example FROM AN NCGM FILE.

    The second line is the desired number of frames per page and the
    remaining lines are scaling and X,Y positioning numbers in inches.

    If you are interested, feel free to copy psfm from my bin directory on
    any of the NCAR computers (e.g., /fs/cgd/home0/mai/bin/psfm).

    If you use a landscape graphcap (e.g., "ctrans -d ps.land.mono gmeta"),
    you should use the "-l" option of psfm to get what you want. In both
    cases (landscape and portrait), the 0,0 coordinate is in the lower left
    corner of the page. Works for both color and monochrome ncgms.

    This is my standard method of producing presentation transparencies from
    NCAR Graphics.

    Do not hesitate to contact me with questions.

    Sincerely yours,

    Andy

                            Andrew W. Mai
          --- __o National Center for Atmospheric Research
       ---- _`\<,_ Boulder, CO 80307 USA mai@ucar.edu
        --- (*)/ (*) http://www.cgd.ucar.edu/gds/mai/mai.html



    This archive was generated by hypermail 2b29 : Sat Nov 03 2001 - 19:21:11 MST