Re: Changing resolution of PNG output

From: Alex Ross <alex.ross_at_nyahnyahspammersnyahnyah>
Date: Thu, 09 Jun 2005 08:35:56 -0800

I have had some problem setting colors, but not enough to deter me from
using the PNG driver. It is simply too expensive to output to
postscript and then convert to png. I'm trying to keep my application
responsive.

Thanks for your help! I spent several hours looking for those resources
yesterday, how nice to come into work and find the answer waiting for
me! Perhaps a mention of the wkWidth and wkHeight resources should be
put into the NCL glossary? They are not in there currently, and I
likely would have found them on my own if they had been.

-Alex Ross

Mary Haley wrote:

>
> Alex and John,
>
> First, let me start off by saying that the PNG driver in PyNGL is
> still under development, as we've had some problems with it not
> producing the expected colors. One of the developers may need to
> step in and elaborate here.
>
> However, if you are having success with the PNG driver, then you can
> set the size by setting the wkWidth and wkHeight resources when you
> open the PYNGL workstation. For example:
>
> rlist = Ngl.Resources()
> rlist.wkWidth = 1000
> rlist.wkHeight = 1000
> wks_type = "png"
> wks = Ngl.open_wks (wks_type,"clmdiv",rlist)
>
> --Mary
>
> On Wed, 8 Jun 2005, Ertl, John wrote:
>
>> Alex,
>>
>> I have had the same question but I use ps2png for a web service and
>> it works
>> fast, but I only do one image at a time. You could also look at PIL
>> (Python
>> Image Library) I have not used it for changing size but it looks
>> straight
>> forward. I have been using PIL for anouther project and it is really
>> nice
>> to use.
>>
>> John Ertl
>> former NWS
>>
>> -----Original Message-----
>> From: Alex Ross
>> To: pyngl-talk_at_ucar.edu
>> Sent: 6/8/05 2:37 PM
>> Subject: Changing resolution of PNG output
>>
>> I am using PyNGL's PNG output for use with a web application. I'd like
>> to make the image file a bit larger than the 512x512 pixels that PyNGL
>> defaults to. I have been unable to find a mention of how to do this
>> anywhere on the PyNGL website or on the NCL website. Is it even
>> possible?
>>
>> Also, I know that I could just output to postscript and use a utility to
>>
>> render my PNG. That method is SLOW, and not a reasonable solution.
>>
>> Thank you for your time.
>>
>> - Alex Ross
>> Student Hire, National Weather Service
>> _______________________________________________
>> pyngl-talk mailing list
>> pyngl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>> _______________________________________________
>> pyngl-talk mailing list
>> pyngl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>>
Received on Thu Jun 09 2005 - 10:35:56 MDT

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:31:53 MST