<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>CerebralCircus</title>
	<link>http://www.cerebralcircus.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Mon, 08 Oct 2007 17:13:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Convulphp</title>
		<link>http://www.cerebralcircus.com/index.php/2007/10/08/convulphp/</link>
		<comments>http://www.cerebralcircus.com/index.php/2007/10/08/convulphp/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 17:13:06 +0000</pubDate>
		<dc:creator>Surukai</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cerebralcircus.com/index.php/2007/10/08/convulphp/</guid>
		<description><![CDATA[
function imageconvolution($src, $filter, $filter_div, $offset){
if ($src==NULL) {
return 0;
}
$sx = imagesx($src);
$sy = imagesy($src);
$srcback = ImageCreateTrueColor ($sx, $sy);
ImageCopy($srcback, $src,0,0,0,0,$sx,$sy);
if($srcback==NULL){
return 0;
}
//Err report fix
$pxl = array(1,1);
for ($y=0; $y&#60;$sy; ++$y){
for($x=0; $x&#60;$sx; ++$x){
$new_r = $new_g = $new_b = 0;
$alpha = imagecolorat($srcback, $pxl[0], $pxl[1]);
$new_a = $alpha &#62;&#62; 24;
for ($j=0; $j&#60;3; ++$j) {
$yv = min(max($y - 1 + $j, 0), $sy - 1);
for [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
function imageconvolution($src, $filter, $filter_div, $offset){<br />
if ($src==NULL) {<br />
return 0;<br />
}</code></p>
<p>$sx = imagesx($src);<br />
$sy = imagesy($src);<br />
$srcback = ImageCreateTrueColor ($sx, $sy);<br />
ImageCopy($srcback, $src,0,0,0,0,$sx,$sy);</p>
<p>if($srcback==NULL){<br />
return 0;<br />
}</p>
<p>//Err report fix<br />
$pxl = array(1,1);</p>
<p>for ($y=0; $y&lt;$sy; ++$y){<br />
for($x=0; $x&lt;$sx; ++$x){<br />
$new_r = $new_g = $new_b = 0;<br />
$alpha = imagecolorat($srcback, $pxl[0], $pxl[1]);<br />
$new_a = $alpha &gt;&gt; 24;</p>
<p>for ($j=0; $j&lt;3; ++$j) {<br />
$yv = min(max($y - 1 + $j, 0), $sy - 1);<br />
for ($i=0; $i&lt;3; ++$i) {<br />
$pxl = array(min(max($x - 1 + $i, 0), $sx - 1), $yv);<br />
$rgb = imagecolorat($srcback, $pxl[0], $pxl[1]);<br />
$new_r += (($rgb &gt;&gt; 16) &amp; 0xFF) * $filter[$j][$i];<br />
$new_g += (($rgb &gt;&gt; <img src='http://www.cerebralcircus.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> &amp; 0xFF) * $filter[$j][$i];<br />
$new_b += ($rgb &amp; 0xFF) * $filter[$j][$i];<br />
}<br />
}</p>
<p>$new_r = ($new_r/$filter_div)+$offset;<br />
$new_g = ($new_g/$filter_div)+$offset;<br />
$new_b = ($new_b/$filter_div)+$offset;</p>
<p>$new_r = ($new_r &gt; 255)? 255 : (($new_r &lt; 0)? 0:$new_r);<br />
$new_g = ($new_g &gt; 255)? 255 : (($new_g &lt; 0)? 0:$new_g);<br />
$new_b = ($new_b &gt; 255)? 255 : (($new_b &lt; 0)? 0:$new_b);</p>
<p>$new_pxl = ImageColorAllocateAlpha($src, (int)$new_r, (int)$new_g, (int)$new_b, $new_a);<br />
if ($new_pxl == -1) {<br />
$new_pxl = ImageColorClosestAlpha($src, (int)$new_r, (int)$new_g, (int)$new_b, $new_a);<br />
}<br />
if (($y &gt;= 0) &amp;&amp; ($y &lt; $sy)) {<br />
imagesetpixel($src, $x, $y, $new_pxl);<br />
}<br />
}<br />
}<br />
imagedestroy($srcback);<br />
return 1;<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cerebralcircus.com/index.php/2007/10/08/convulphp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A way to show how things can be done.</title>
		<link>http://www.cerebralcircus.com/index.php/2007/09/19/a-way-to-show-how-things-can-be-done/</link>
		<comments>http://www.cerebralcircus.com/index.php/2007/09/19/a-way-to-show-how-things-can-be-done/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 13:28:50 +0000</pubDate>
		<dc:creator>Surukai</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cerebralcircus.com/index.php/2007/09/19/a-way-to-show-how-things-can-be-done/</guid>
		<description><![CDATA[Explain to me, how?
]]></description>
			<content:encoded><![CDATA[<p>Explain to me, how?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cerebralcircus.com/index.php/2007/09/19/a-way-to-show-how-things-can-be-done/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.cerebralcircus.com/index.php/2007/09/14/hello-world/</link>
		<comments>http://www.cerebralcircus.com/index.php/2007/09/14/hello-world/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 14:35:52 +0000</pubDate>
		<dc:creator>Surukai</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cerebralcircus.com/index.php/2007/09/14/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
