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

Home » Public Forums » archive » Re: NG save method
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
Re: NG save method [message #83476] Fri, 08 March 2013 09:34
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, March 7, 2013 4:35:31 PM UTC-7, mark...@gmail.com wrote:
> I have a question on the save method when using new graphics.
>
>
>
> I've been creating a large number of small plots using NG and while the performance of the plot routine is ok, saving the image to a PNG file seems relatively slow. The degradation in speed is barely noticeable for a single image but starts to become obvious when you're creating many images.
>
>
>
> Is there anything I can do to speed this process up eg use JPG instead of PNG? Use a lower resolution? Crop borders to reduce image size? Use /transparent to reduce the number of colours?
>
>
>
> IDL 8.2.2 supposedly improves the performance of NG - dies anyone know if the save performance is also improved?
>
>
>
> Mark

Hi Mark,

By default, when you save to an image file format (png, jpeg, gif, etc) with new graphics, it saves the image at a resolution of 600 dpi. This is so your image will look nice if it is embedded within a paper or send to a printer.

If you don't need such high resolution, then I would just set the resolution keyword:

p = plot(/test, title='Mass [$M_{\odot}$]')
tic
p.Save, 'myplot.png', RESOLUTION=300
toc

On my Windows 7 laptop, the save takes about 0.7 seconds. If you are just sending the plot to Powerpoint or a webpage, then you could lower the resolution even further.

Hope this helps!
Cheers,
Chris
ExelisVIS
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: image-convolution
Next Topic: Re: Majority Filter

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

Current Time: Wed Oct 08 17:03:39 PDT 2025

Total time taken to generate the page: 0.00578 seconds