<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Can you help me generate an alpha channel gradient image?</title>
	<atom:link href="http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/</link>
	<description>Listen. Reflect. Explore. Solve.</description>
	<lastBuildDate>Sun, 14 Apr 2013 08:36:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Aaron Sherman</title>
		<link>http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/#comment-1437</link>
		<dc:creator><![CDATA[Aaron Sherman]]></dc:creator>
		<pubDate>Fri, 30 Oct 2009 21:15:58 +0000</pubDate>
		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=313#comment-1437</guid>
		<description><![CDATA[Oh right, and you can modify the opacity of the blend tool to modify the max alpha value at the edges, though this is also accomplished by dragging further past the edge of the image, so that max opacity would be somewhere off-image.]]></description>
		<content:encoded><![CDATA[<p>Oh right, and you can modify the opacity of the blend tool to modify the max alpha value at the edges, though this is also accomplished by dragging further past the edge of the image, so that max opacity would be somewhere off-image.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Sherman</title>
		<link>http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/#comment-1436</link>
		<dc:creator><![CDATA[Aaron Sherman]]></dc:creator>
		<pubDate>Fri, 30 Oct 2009 21:14:07 +0000</pubDate>
		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=313#comment-1436</guid>
		<description><![CDATA[I&#039;m confused, and perhaps only because I&#039;m misunderstanding the question. I assume you want to pre-generate the gradient, so that&#039;s easily accomplished with The Gimp. Here&#039;s how I did one:

* File-&gt;New (select desired size and Advanced-&gt;Fill-&gt;Transparent)
* Select foreground color desired (black is the default)
* Select blend tool (&quot;L&quot;)
* Now, in the options at the bottom of the tool window:
* Click on &quot;Gradient&quot; widget to get popup
* Select &quot;FG to transparent&quot;
* Clock the  arrow next to Gradient to reverse direction
* Select &quot;Radial&quot; under &quot;Shape&quot;.
* Now, in the image window:
* Click and hold mouse where you want the alpha overlay to be centered (transparent)
* Drag to farthest (from where you clicked) corner, and just a little past it.
* Release to draw.

Done.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m confused, and perhaps only because I&#8217;m misunderstanding the question. I assume you want to pre-generate the gradient, so that&#8217;s easily accomplished with The Gimp. Here&#8217;s how I did one:</p>
<p>* File-&gt;New (select desired size and Advanced-&gt;Fill-&gt;Transparent)<br />
* Select foreground color desired (black is the default)<br />
* Select blend tool (&#8220;L&#8221;)<br />
* Now, in the options at the bottom of the tool window:<br />
* Click on &#8220;Gradient&#8221; widget to get popup<br />
* Select &#8220;FG to transparent&#8221;<br />
* Clock the  arrow next to Gradient to reverse direction<br />
* Select &#8220;Radial&#8221; under &#8220;Shape&#8221;.<br />
* Now, in the image window:<br />
* Click and hold mouse where you want the alpha overlay to be centered (transparent)<br />
* Drag to farthest (from where you clicked) corner, and just a little past it.<br />
* Release to draw.</p>
<p>Done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cosimo</title>
		<link>http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/#comment-1144</link>
		<dc:creator><![CDATA[Cosimo]]></dc:creator>
		<pubDate>Tue, 01 Sep 2009 06:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=313#comment-1144</guid>
		<description><![CDATA[Hi, Tim.

Not sure if it works for you, but I&#039;ve done something similar to pre-process big texture files before loading them into OpenGL applications. And yes, this is in Perl.

I couldn&#039;t test it right now, because my Win32 Imager doesn&#039;t support PNG, but it should work fairly well. Let me know.

http://github.com/cosimo/imager-alpha-mask/tree/master]]></description>
		<content:encoded><![CDATA[<p>Hi, Tim.</p>
<p>Not sure if it works for you, but I&#8217;ve done something similar to pre-process big texture files before loading them into OpenGL applications. And yes, this is in Perl.</p>
<p>I couldn&#8217;t test it right now, because my Win32 Imager doesn&#8217;t support PNG, but it should work fairly well. Let me know.</p>
<p><a href="http://github.com/cosimo/imager-alpha-mask/tree/master" rel="nofollow">http://github.com/cosimo/imager-alpha-mask/tree/master</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leon Brocard</title>
		<link>http://blog.timbunce.org/2009/08/31/can-you-help-me-generate-an-alpha-channel-gradient-image/#comment-1143</link>
		<dc:creator><![CDATA[Leon Brocard]]></dc:creator>
		<pubDate>Tue, 01 Sep 2009 06:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://timbunce.wordpress.com/?p=313#comment-1143</guid>
		<description><![CDATA[Here&#039;s how to do it using Image::Imlib2:

#!perl
use strict;
use warnings;
use Image::Imlib2;

my $source = Image::Imlib2-&gt;load(&#039;square-gradient-mask.png&#039;);
my $destination = Image::Imlib2-&gt;new( $source-&gt;width, $source-&gt;height );

foreach my $x ( 0 .. $source-&gt;width ) {
    foreach my $y ( 0 .. $source-&gt;height ) {
        my ( $r, $g, $b, $a ) = $source-&gt;query_pixel( $x, $y );
        my $average = int( ( $r + $g + $b ) / 3 );
        $destination-&gt;set_colour( 255, 255, 255, $average );
        $destination-&gt;draw_point( $x, $y );
    }
}

$destination-&gt;save(&#039;square-alpha.png&#039;);]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s how to do it using Image::Imlib2:</p>
<p>#!perl<br />
use strict;<br />
use warnings;<br />
use Image::Imlib2;</p>
<p>my $source = Image::Imlib2-&gt;load(&#8216;square-gradient-mask.png&#8217;);<br />
my $destination = Image::Imlib2-&gt;new( $source-&gt;width, $source-&gt;height );</p>
<p>foreach my $x ( 0 .. $source-&gt;width ) {<br />
    foreach my $y ( 0 .. $source-&gt;height ) {<br />
        my ( $r, $g, $b, $a ) = $source-&gt;query_pixel( $x, $y );<br />
        my $average = int( ( $r + $g + $b ) / 3 );<br />
        $destination-&gt;set_colour( 255, 255, 255, $average );<br />
        $destination-&gt;draw_point( $x, $y );<br />
    }<br />
}</p>
<p>$destination-&gt;save(&#8216;square-alpha.png&#8217;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
