comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Is it possible to save the figure file in .PNG format directly in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Is it possible to save the figure file in .PNG format directly in IDL? [message #90349] Wed, 25 February 2015 01:27 Go to next message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

I am using Coyote library in IDL. Is there a direct way to save the figure file in .PNG format instead of saving first in .PS format and then converting to a .PNG format?

cgPS_Open, FigFile

...
...
...

cgPS_Close
cgPS2Raster, FigFile, /PNG

Thanking you in advance,
Regards,
Madhavan
Re: Is it possible to save the figure file in .PNG format directly in IDL? [message #90351 is a reply to message #90349] Wed, 25 February 2015 05:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Madhavan Bomidi writes:

> I am using Coyote library in IDL. Is there a direct way to save the figure file in .PNG format instead of saving first in .PS format and then converting to a .PNG format?
>
> cgPS_Open, FigFile
>
> ...
> ...
> ...
>
> cgPS_Close
> cgPS2Raster, FigFile, /PNG

cgPlot, data, Output='myfile.png'

You can find the on-line help for these routines here:

http://www.idlcoyote.com/idldoc/cg/index.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Is it possible to save the figure file in .PNG format directly in IDL? [message #90361 is a reply to message #90349] Wed, 25 February 2015 18:25 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Wednesday, February 25, 2015 at 3:27:52 AM UTC-6, Madhavan Bomidi wrote:
> Hello,
>
> I am using Coyote library in IDL. Is there a direct way to save the figure file in .PNG format instead of saving first in .PS format and then converting to a .PNG format?
>
> cgPS_Open, FigFile
>
>
> cgPS_Close
> cgPS2Raster, FigFile, /PNG
>

There are options that can control what happens to the PS file, if that's your concern.

The question is _why_ you don't want the PS file first.

While we're here, this is a little more succinct:

cgPS_Open, FigFile
...
...
cgPS_Close, /PNG

which calls cgPS2Raster under the hood.
Re: Is it possible to save the figure file in .PNG format directly in IDL? [message #90412 is a reply to message #90361] Mon, 02 March 2015 06:43 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Thank you David & Philip. The reason why I don't require PS file first is that it is occupying more space and the file size is big sometimes.

Thanking you once again,
Regards,
Madhavan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: star symbol in labels??
Next Topic: interpolate 3D matrix

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:34:44 PDT 2025

Total time taken to generate the page: 0.00486 seconds