Re: Transparent Background

From: <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 28 2012 - 13:52:18 MDT

Hi Carl,

Yes PNG image quality is better these days. You can call:

wks = gsn_open_wks("newpng", ...)

In the next version of NCL, this driver will be the default, so that
the workstation name is simply "png".

Rick

On Wed, 28 Mar 2012 15:03:23 -0400
  Carl Schreck <carl@cicsnc.org> wrote:
> Daran,
>
> That's a good suggestion. In previous versions of NCL, the support
>for png
> was very minimal. The image quality wasn't nearly as good as I get
>from
> convert. Maybe it's better now, I'll give it a try... What do I pass
>that
> res to?
>
> Carl
>
> On Wed, Mar 28, 2012 at 2:20 PM, Daran L. Rife <drife@ucar.edu>
>wrote:
>
>> Hi Carl,
>>
>> Perhaps this is a silly question, but have you considered using the
>> PNG workstation within NCL, rather than EPS? Seems like you could
>> remove the additional ImageMagick conversion (EPS => PNG) if you
>>simply
>> change your NCL workstation to PNG. Something like this:
>>
>> res@wkFormat = "newpng"
>>
>>
>> Daran
>>
>> --
>>
>> Date: Wed, 28 Mar 2012 12:08:15 -0400
>> From: Carl Schreck <carl@cicsnc.org>
>> Subject: Transparent Background
>> To: ncl-talk <ncl-talk@ucar.edu>
>> Message-ID:
>> <CANGuUDG-YY3wGRXcmwSguHXZ3JATQ-qdQiEic5FGD03XCNMfPA@mail.gmail.com
>> >
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> I recently had to upgrade imageMagick to the latest version, and
>>I've been
>> having some strange results converting NCL-made eps files to png.
>>See the
>> attached file. It looks almost ok, but the background is transparent
>> instead of white. It doesn't show up in this example, but if I had
>>done
>> shaded contours, that shading would be white. Anything outside of
>>the plot
>> would still be transparent though.
>>
>> This could probably be addressed on either the NCL side or the
>>imageMagick
>> side, but I'm stumped on both sides. Any suggestions?
>>
>> I am using imageMagick 6.7.6 and NCL 6.0.0. I do the conversion as
>>"convert
>> -trim +repage -density 150 genesis.eps genesis.png"
>>
>> My .hluresfile has these lines:
>> ! White background/black foreground
>> *wkForegroundColor : (/0.,0.,0./)
>> *wkBackgroundColor : (/1.,1.,1./)
>>
>> Thanks!
>> Carl
>>
>> --
>> Carl J. Schreck III, PhD
>> Postdoctoral Research Associate
>> Cooperative Institute for Climate and Satellites (CICS-NC)
>> North Carolina State University and NOAA's National Climatic Data
>>Center
>> 151 Patton Avenue
>> Asheville, NC 28801
>> Tel: 828-257-3140
>> carl@cicsnc.org
>> http://monitor.cicsnc.org/mjo/
>> http://www.atmos.albany.edu/student/carl/
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>
> --
> Carl J. Schreck III, PhD
> Postdoctoral Research Associate
> Cooperative Institute for Climate and Satellites (CICS-NC)
> North Carolina State University and NOAA's National Climatic Data
>Center
> 151 Patton Avenue
> Asheville, NC 28801
> Tel: 828-257-3140
> carl@cicsnc.org
> http://monitor.cicsnc.org/mjo/
> http://www.atmos.albany.edu/student/carl/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 28 13:52:36 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT