Re: info on converting NCL/NCARG images to other formats

From: Fred Clare (fred AT ucar.edu)
Date: Mon Oct 17 2005 - 22:14:52 MDT

  • Next message: Rick Grubin: "Re: install problems for Ncarg + NCL on Mandriva LE 2005"

    I have had good luck using "eps2png" from:

        http://www.squirrel.nl/people/jvromans/software/sw_eps2png.html

    This is freely available and also converts eps to "gif" and "jpg." It
    requires perl and ghostscript. To generate the eps file from PS,
    use "ps2epsi."

    Fred Clare

    On Oct 14, 2005, at 12:55 AM, Mary Haley wrote:

    >
    > Hi everybody,
    >
    > We've had a few inquiries lately on converting images created by NCL
    > and NCAR Graphics to other formats like JPEG, PNG, and MPEG (for
    > movies). I thought I'd post some information that I think might be
    > useful, and I'd like to open up the board for anybody else to offer
    > their own wisdom on this topic.
    >
    > Many of you have been using the ncgm2gif or ncgm2mpeg scripts to do
    > conversions from NCGM to GIF or MPEG. Lately, however, I've been
    > finding that these scripts don't always work well because our raster
    > tools that these scripts depend on (like ctrans and rassplit) haven't
    > been updated in awhile, and don't always work as expected.
    >
    > We unfortunately don't have the staff to focus on updating our raster
    > library to the same level that other specialized raster tools are
    > capable of. As such, I'd like offer some other solutions for raster
    > conversions. Also, I've noticed that starting with NCGMs to create
    > images for presentations doesn't always produce the best looking
    > fonts.
    >
    > My recommendation is to start with a PostScript (PS) file, and then
    > use "convert" from the ImageMagick suite of tools to convert the PS
    > file to another format like GIF, PNG, or even MPEG.
    >
    > You can get the ImageMagick suite from:
    >
    > http://www.imagemagick.org/
    >
    > Click on the "download" link on the left side and you will be
    > presented with lots of options for download locations.
    >
    > Mac users can download it using "fink install imagemagick". You must
    > have fink installed first - http://fink.sourceforge.net/.
    >
    > Once you have the tools built and installed, you can convert your PS
    > files to other formats using:
    >
    > convert -trim file.ps file.png
    >
    > I like to use the "-trim" option to remove unwanted white space around
    > my image. This cuts it pretty close, so if you put it in a PowerPoint
    > presentation, it is better to use a pure white background so the
    > cropped image doesn't look funny.
    >
    > Documentation on "convert" can be found at:
    >
    > http://www.imagemagick.org/script/convert.php
    >
    > If you want to convert your PS file to an MPEG file for generating a
    > movie, you can still use "convert". You may also need to download the
    > program "mpeg2encode". The source code for this can be downloaded
    > from:
    >
    > http://www.mpeg.org/MSSG/
    >
    >> From here you want to download the source code for "mpeg2vidcodec".
    > The "mpeg2encode" code is pretty straightforward to build (in the
    > directory mpeg2/src/mpeg2enc).
    >
    > Once you have mpeg2encode installed, you can convert your
    > PS file to MPEG with:
    >
    > convert file.ps file.mpg
    >
    > There are lots of options available with convert, that, according to
    > their web page, allow you to "resize an image, blur, crop, despeckle,
    > dither, draw on, flip, join, re-sample, and much more."
    >
    > I will put this information on our websites, and meanwhile, I welcome
    > input from others who have different ways of converting their NCL/NCAR
    > Graphics images.
    >
    > Cheers,
    >
    > --Mary
    >
    > -------------------------------------------------
    > Mary Haley haley AT unknown
    > NCAR/SCD/VETS 303-497-1254 (voice)
    > 1850 Table Mesa Dr 303-497-1239 (fax)
    > Boulder, CO 80305
    > -------------------------------------------------
    >
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk AT unknown
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk

    _______________________________________________
    ncarg-talk mailing list
    ncarg-talk AT unknown
    http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



    This archive was generated by hypermail 2b29 : Mon Oct 17 2005 - 22:44:10 MDT