Transparent colours

Matt Alonso matt.alonso at GMAIL.COM
Mon Jul 16 14:28:58 EDT 2007


Good Afternoon,

I am not sure whether or not it is possible to do this "directly" through
GrADS however I have been able to achieve this using a program called
ImageMagick (http://www.imagemagick.org).  The snippet of code below will
take an image and convert the specified color (in this case white) to be
transparent and then overlay that on another image which is simply a map of
terrain.

'printim name_of_image.png png'
'!convert -transparent white name_of_image.png name_of_output_image.png'
'!composite name_of_output_image.png name_of_terrain_image.png
name_of_output_image_with_terrain.png'

If you want all the image names can be the same (with the exception of the
background image).  If this does not make any sense let me know and I can
try and come up with a better explanation/example.

Cheers,
Matt

On 7/16/07, bernd.becker at metoffice.gov.uk <bernd.becker at metoffice.gov.uk>
wrote:
>
> Hello,
>
> this may be one for GrADS developers:
>
> Is it possible to create "transparent" colours in GrADS?
>
> The idea came about wanting to show anomaly charts
> for consecutive time periods to express an element
> of persistence in the anomaly.
>
> In some areas, multiple time steps would overlay, showing the brightest
> colours with the most persistence, in other areas the
> hue would be more pastel, indicating a transient anomaly.
>
> How can this plot be achieved?
>
> Best regards,
> Bernd.
>
>
> --
> Bernd Becker   The Monthly Outlook
> Met Office  FitzRoy Road  Exeter   Devon EX1 3PB  United Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> E-mail:bernd.becker at metoffice.gov.uk -  http://www.metoffice.gov.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070716/45acb20c/attachment.html 


More information about the gradsusr mailing list