Re: Changing resolution of PNG output

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 9 Jun 2005 22:27:46 -0600

Hi Alex,

Adding wkWidth and wkHeight to the glossary would normally be a great
idea, but we have hundreds of resources like this,
so I'm not sure the glossary is a good place for all of them.

Part of the problem is that the PNG driver, since it is not fully
functional, has not really been documented yet. I believe
it has been mentioned in passing in various ncl-talk and pyngl-talk
forums, but it hasn't been officially documented
in the resource documentation or in the class page. Something like
this would have appeared in:

     http://www.ncl.ucar.edu/Document/Graphics/Resources/wk.shtml

This is where we will eventually add the "image workstation"
documentation, and hence it would
have talked about using wkWidth and wkHeight for the resolution. This
project has been put on the back burner for now
while we focus on getting our file handling and data analysis
capability into PyNGL.

--Mary

On Jun 9, 2005, at 10:35 AM, Alex Ross wrote:

> 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
>>>
>

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Jun 09 2005 - 22:27:46 MDT

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