Re: ps output behavior in NCL 6.1.0-beta

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 03 2012 - 11:44:32 MDT

Hi Ozan,

I don't have a good answer for you, but I have a couple of work-arounds until we might have a better solution.

For the second problem, try adding "delete(wks)" just before the system call.

For the first problem, you can get what you want by running "convert -trim" twice:

convert --trim foo.ps temp.png
convert --trim temp.png foo.png

The reason this works is that the postscript driver fills the page background with completely transparent color, and then the area on the page where the plot is actually drawn is later filled with opaque white. (the Unix/Linux command "display" will show the distinction). So the first trim is removing the transparent edges; the second trim removes the white edges.

Hope this helps for the short term -- I'll file an issue ticket on these.

Rick

On Jul 3, 2012, at 9:13 AM, ozan mert gokturk wrote:

> Dear All,
>
> Using the latest version of NCL (6.1.0-beta), the output postscript files exhibit some strange behavior.
>
> When I try to convert the output postscript file (ps) to, say, png; the "-trim" option of the imagemagick's "convert" command does not work. This started to happen after upgrading to NCL 6.1.0-beta.
>
> Moreover, since 6.1.0-beta, I cannot get the NCL's "system" command simply to work with the imagemagick's "convert" command. There is exactly the same command in the NCL script (the command that I use on the command line) but I get the following error:
>
> convert: geometry does not contain image `sources_targets.ps' @ warning/attribute.c/GetImageBoundingBox/239
>
>
> Can anyone tell me whether these problems are specific to my system or there is an issue with the ps outputs of NCL 6.1.0-beta ? Here is my uname -a output: Linux nipho 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>
> And my gcc --version output: gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
>
> I downloaded the NCL 6.1.0-beta version for Debian x86-64 compiled, compiled with gcc 4.4.5, not open-dap enabled.
>
> Please find my script (kod.ncl) and the resulting ps output (sources_targets.ps) attached.
>
> Thanks in advance,
> Ozan
>
> <kod.ncl><sources_targets.ps>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 3 11:44:40 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 03 2012 - 15:40:39 MDT