<div class="gmail_quote">On Wed, Jun 24, 2009 at 10:58 AM, Stephen R McMillan <span dir="ltr">&lt;<a href="mailto:smcmillan@planalytics.com">smcmillan@planalytics.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font size="2" face="sans-serif">Wang,</font><br><br><font size="2" face="sans-serif">Try using the &quot;-t&quot; (transparent)
option with printim.  For example,</font><br><br><font size="2" face="sans-serif">&#39;printim image.png -t 0&#39; should produce
an image with a transparent background (assuming background is color 0).</font><br><br><font size="2" face="sans-serif">Reference from GrADS Documentation Index:
 </font><a href="http://grads.iges.org/grads/gadoc/gradcomdprintim.html" target="_blank"><font size="2" face="sans-serif">http://grads.iges.org/grads/gadoc/gradcomdprintim.html</font></a><br><br><font size="2" face="sans-serif">Note:  I believe the transparent
option will work only with versions 1.9 or later.</font><br></blockquote><div><br></div><div>Recently Pablo Romero implemented additional transparency functionality in the gxyat extension. For example, you can specify a transparency level for each color with the set_rgba command extension.  You will need the latest OpenGrADS bundle release available from <a href="http://opengrads.org">http://opengrads.org</a>. Notice that you have to use &quot;gxyat&quot; instead of &quot;printim&quot; for enabling this feature; this will also give you smoother fonts.   A manual page is built in:</div>
<div><br></div><div><div>ga-&gt; set_rgba</div><div><br></div><div>NAME</div><div>     set_rgba - define color including alpha channel</div><div><br></div><div>SYNOPSIS</div><div>     set_rgba color red green blue alpha [mask]</div>
<div><br></div><div>DESCRIPTION</div><div>     This User Defined Command (UDC) defines *color* given its</div><div>     RGB triplet along with its *alpha* channel.</div><div><br></div><div>     color   integer in the range [16-255]</div>
<div>     red, </div><div>     green,</div><div>     blue    integers in the range [0-255]</div><div>     alpha   float, with alpha ranging from 0.0 (fully transparent)</div><div>             to 1.0 (fully opaque).</div><div>
<br></div><div>    The optional parameter *mask* determines whether the color below</div><div>    it is visible or not.</div><div><br></div><div>    mask=0  --- if alpha&lt;1, *color* will be semi-transparent and the</div>
<div>                colors below it will be visible (default)</div><div>    mask=1  --- if alpha&lt;1, *color* will be semi-transparent but the</div><div>                colors below it will *not* be visible </div><div><br>
</div><div>EXAMPLE</div><div>    In order to emulate the -t option in printim </div><div><br></div><div>       ga-&gt; set rgb 60 125 125 125</div><div>       ga-&gt; printim img.png -t 60</div><div><br></div><div>       Specify alpha=0 and mask=1</div>
<div><br></div><div>       ga-&gt; set_rgba 60 125 125 125 0 1</div><div>       ga-&gt; gxyat img.png</div><div><br></div></div><div><br></div><div><br></div></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>