<?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/"
		>
<channel>
	<title>Comments on: Image fun</title>
	<atom:link href="http://www.phpied.com/image-fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpied.com/image-fun/</link>
	<description>Stoyan&#039;s blog about &#60;a href=&#34;/category/xhtml&#34; class=&#34;tag-minor&#34;&#62;(x)html(5)&#60;/a&#62;, &#60;a href=&#34;/category/ajax&#34; class=&#34;tag-major&#34;&#62;ajax&#60;/a&#62;, &#60;a href=&#34;/category/bookmarklets&#34; class=&#34;tag-major&#34;&#62;bookmarklets&#60;/a&#62;, &#60;a href=&#34;/category/browsers&#34; class=&#34;tag-minor&#34;&#62;browsers&#60;/a&#62;, &#60;a href=&#34;/category/css&#34; class=&#34;tag-normal&#34;&#62;css&#60;/a&#62;, &#60;a href=&#34;/category/firebug&#34; class=&#34;tag-minor&#34;&#62;firebug&#60;/a&#62;, &#60;a href=&#34;/category/javascript&#34; class=&#34;tag-numero-uno&#34;&#62;javascript&#60;/a&#62;, &#60;a href=&#34;/category/json&#34; class=&#34;tag-normal&#34;&#62;json&#60;/a&#62;, &#60;a href=&#34;/category/mdb2&#34; class=&#34;tag-minor&#34;&#62;mdb2&#60;/a&#62;, &#60;a href=&#34;/category/mysql&#34; class=&#34;tag-normal&#34;&#62;mysql&#60;/a&#62;, &#60;a href=&#34;/category/pear&#34; class=&#34;tag-numero-uno&#34;&#62;pear&#60;/a&#62;, &#60;a href=&#34;/category/performance&#34; class=&#34;tag-major&#34;&#62;performance&#60;/a&#62;, &#60;a href=&#34;/category/php&#34; class=&#34;tag-numero-uno&#34;&#62;php&#60;/a&#62;, &#60;a href=&#34;/category/phpbb&#34; class=&#34;tag-major&#34;&#62;phpbb&#60;/a&#62;, &#60;a href=&#34;/category/tools&#34; class=&#34;tag-normal&#34;&#62;tools&#60;/a&#62;, &#60;a href=&#34;/category/yslow&#34; class=&#34;tag-minor&#34;&#62;yslow&#60;/a&#62;, &#60;a href=&#34;/category/yui&#34; class=&#34;tag-normal&#34;&#62;yui&#60;/a&#62;, &#60;a href=&#34;/category/writing&#34; class=&#34;tag-minor&#34;&#62;writing&#60;/a&#62;, &#60;a href=&#34;/category/music&#34; class=&#34;tag-major&#34;&#62;music&#60;/a&#62;,... &#60;a href=&#34;/category/life-and-everything&#34; class=&#34;tag-normal&#34;&#62;life and everything&#60;/a&#62;.</description>
	<lastBuildDate>Fri, 10 Feb 2012 22:15:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Sulejow</title>
		<link>http://www.phpied.com/image-fun/#comment-79920</link>
		<dc:creator>Sulejow</dc:creator>
		<pubDate>Sat, 19 Nov 2011 16:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-79920</guid>
		<description>Undeniably imagine that which you said. Your favourite justification appeared to be at the net the simplest thing to be mindful of. I say to you, I definitely get irked whilst folks consider issues that they plainly do not realize about. You managed to hit the nail upon the highest and also defined out the entire thing without having side effect , folks could take a signal. Will likely be again to get more. Thank you</description>
		<content:encoded><![CDATA[<p>Undeniably imagine that which you said. Your favourite justification appeared to be at the net the simplest thing to be mindful of. I say to you, I definitely get irked whilst folks consider issues that they plainly do not realize about. You managed to hit the nail upon the highest and also defined out the entire thing without having side effect , folks could take a signal. Will likely be again to get more. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: everything about java</title>
		<link>http://www.phpied.com/image-fun/#comment-78870</link>
		<dc:creator>everything about java</dc:creator>
		<pubDate>Mon, 17 Oct 2011 02:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-78870</guid>
		<description>&lt;strong&gt;everything about java...&lt;/strong&gt;

[...]Image fun / Stoyan&#039;s phpied.com[...]...</description>
		<content:encoded><![CDATA[<p><strong>everything about java&#8230;</strong></p>
<p>[...]Image fun / Stoyan&#8217;s phpied.com[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Image fun with PHP</title>
		<link>http://www.phpied.com/image-fun/#comment-77649</link>
		<dc:creator>Image fun with PHP</dc:creator>
		<pubDate>Thu, 05 May 2011 08:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-77649</guid>
		<description>[...] one of the image fun is here, it contains code that more or less does the same things, but pixel by pixel, which is very slow, [...]</description>
		<content:encoded><![CDATA[<p>[...] one of the image fun is here, it contains code that more or less does the same things, but pixel by pixel, which is very slow, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heleg</title>
		<link>http://www.phpied.com/image-fun/#comment-75649</link>
		<dc:creator>Heleg</dc:creator>
		<pubDate>Mon, 07 Feb 2011 10:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-75649</guid>
		<description>The last function in previous Reply

private function addColor($value=0,$addvalue=0)
{ 
  $n=$value+$addvalue;
  return ($n &gt; 255) ? 255 : (($n &lt; 0) ? 0 : (int)($n));
}</description>
		<content:encoded><![CDATA[<p>The last function in previous Reply</p>
<p>private function addColor($value=0,$addvalue=0)<br />
{<br />
  $n=$value+$addvalue;<br />
  return ($n &gt; 255) ? 255 : (($n &lt; 0) ? 0 : (int)($n));<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heleg</title>
		<link>http://www.phpied.com/image-fun/#comment-75648</link>
		<dc:creator>Heleg</dc:creator>
		<pubDate>Mon, 07 Feb 2011 10:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-75648</guid>
		<description>Thanks for the article
Let me offer a few more functions
/*
 *Changing the color scale == coarsening, reducing the number of shades
 * @param $factor Int from 1 to 255
 */
public function scale($factor=8)
{$r=round($this-&gt;r/$factor);
 $g=round($this-&gt;g/$factor);
 $b=round($this-&gt;b/$factor);
 $this-&gt;r=$this-&gt;addColor(0,$r*$factor);
 $this-&gt;g=$this-&gt;addColor(0,$g*$factor);
 $this-&gt;b=$this-&gt;addColor(0,$b*$factor);

}

/*
 * Approximation to a certain color, default to white
 * Фактор  от 0 до бесконечности определяет степень приближения
 * @param $factor Double from -1 to any positiv number
 * @params $r,$g,$b Int from 0 to 255
 */
public function closerTo($factor=5,$r=255, $g=255, $b=255)
{ $n=($this-&gt;r+$factor*$r)/($factor+1);
  $this-&gt;r=$this-&gt;addColor(0, $n);
  $n=($this-&gt;g+$factor*$g)/($factor+1);
  $this-&gt;g=$this-&gt;addColor(0, $n);
  $n=($this-&gt;b+$factor*$b)/($factor+1);
  $this-&gt;b=$this-&gt;addColor(0, $n);
  return true;
}
/*
Function for the addition (and subtraction) in the colors
  * The result is always&gt; = 0 and  255) ? 255 : (($n &lt; 0) ? 0 : (int)($n));
}</description>
		<content:encoded><![CDATA[<p>Thanks for the article<br />
Let me offer a few more functions<br />
/*<br />
 *Changing the color scale == coarsening, reducing the number of shades<br />
 * @param $factor Int from 1 to 255<br />
 */<br />
public function scale($factor=8)<br />
{$r=round($this-&gt;r/$factor);<br />
 $g=round($this-&gt;g/$factor);<br />
 $b=round($this-&gt;b/$factor);<br />
 $this-&gt;r=$this-&gt;addColor(0,$r*$factor);<br />
 $this-&gt;g=$this-&gt;addColor(0,$g*$factor);<br />
 $this-&gt;b=$this-&gt;addColor(0,$b*$factor);</p>
<p>}</p>
<p>/*<br />
 * Approximation to a certain color, default to white<br />
 * Фактор  от 0 до бесконечности определяет степень приближения<br />
 * @param $factor Double from -1 to any positiv number<br />
 * @params $r,$g,$b Int from 0 to 255<br />
 */<br />
public function closerTo($factor=5,$r=255, $g=255, $b=255)<br />
{ $n=($this-&gt;r+$factor*$r)/($factor+1);<br />
  $this-&gt;r=$this-&gt;addColor(0, $n);<br />
  $n=($this-&gt;g+$factor*$g)/($factor+1);<br />
  $this-&gt;g=$this-&gt;addColor(0, $n);<br />
  $n=($this-&gt;b+$factor*$b)/($factor+1);<br />
  $this-&gt;b=$this-&gt;addColor(0, $n);<br />
  return true;<br />
}<br />
/*<br />
Function for the addition (and subtraction) in the colors<br />
  * The result is always&gt; = 0 and  255) ? 255 : (($n &lt; 0) ? 0 : (int)($n));<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Łomża Bazzell</title>
		<link>http://www.phpied.com/image-fun/#comment-75519</link>
		<dc:creator>Łomża Bazzell</dc:creator>
		<pubDate>Sat, 08 Jan 2011 07:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-75519</guid>
		<description>It&#039;s excellent site, I was looking for something like this</description>
		<content:encoded><![CDATA[<p>It&#8217;s excellent site, I was looking for something like this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadow</title>
		<link>http://www.phpied.com/image-fun/#comment-72363</link>
		<dc:creator>Shadow</dc:creator>
		<pubDate>Fri, 26 Feb 2010 16:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-72363</guid>
		<description>Hi ! Very good article for the beginners. However I’m searching for a function to know the brightness of a gif file…is it more clear or more dark ? Do you know if it’s possible ? Best Regards.

http://www.doktortr.net</description>
		<content:encoded><![CDATA[<p>Hi ! Very good article for the beginners. However I’m searching for a function to know the brightness of a gif file…is it more clear or more dark ? Do you know if it’s possible ? Best Regards.</p>
<p><a href="http://www.doktortr.net" rel="nofollow">http://www.doktortr.net</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sachin B</title>
		<link>http://www.phpied.com/image-fun/#comment-72028</link>
		<dc:creator>Sachin B</dc:creator>
		<pubDate>Mon, 21 Dec 2009 11:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-72028</guid>
		<description>Thanks, Nice Article</description>
		<content:encoded><![CDATA[<p>Thanks, Nice Article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Res</title>
		<link>http://www.phpied.com/image-fun/#comment-71277</link>
		<dc:creator>Res</dc:creator>
		<pubDate>Sun, 02 Aug 2009 09:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-71277</guid>
		<description>function colortune($pixel, $factor) 
{ 
$pixel-&gt;r=$pixel-&gt;r + $factor[0];
$pixel-&gt;g=$pixel-&gt;g + $factor[1];
$pixel-&gt;b=$pixel-&gt;b + $factor[2];

return new Pixel( 
$pixel-&gt;r,
$pixel-&gt;g,
$pixel-&gt;b
); 
}

use:
$factor=array(&quot;$r&quot;,&quot;$g&quot;,&quot;$b&quot;);
$po-&gt;pixelOperation($image, $img2, array($po, &#039;colorbalance&#039;), $factor);

ReS©

test:
original: http://narod.ru/disk/11543277000/0.png.html
$factor=array(&quot;44&quot;,&quot;138,&quot;44&quot;);
$po-&gt;pixelOperation($image, $img2, array($po, &#039;colortune&#039;), $factor);
$po-&gt;pixelOperation($img2, $img2, array($po, &#039;adjustBrightness&#039;), &quot;-25&quot;); 
$po-&gt;pixelOperation($img2, $img2, array($po, &#039;gamma&#039;), &quot;1.5&quot;); 
result: http://narod.ru/disk/11543243000/00.png.html</description>
		<content:encoded><![CDATA[<p>function colortune($pixel, $factor)<br />
{<br />
$pixel-&gt;r=$pixel-&gt;r + $factor[0];<br />
$pixel-&gt;g=$pixel-&gt;g + $factor[1];<br />
$pixel-&gt;b=$pixel-&gt;b + $factor[2];</p>
<p>return new Pixel(<br />
$pixel-&gt;r,<br />
$pixel-&gt;g,<br />
$pixel-&gt;b<br />
);<br />
}</p>
<p>use:<br />
$factor=array(&#8220;$r&#8221;,&#8221;$g&#8221;,&#8221;$b&#8221;);<br />
$po-&gt;pixelOperation($image, $img2, array($po, &#8216;colorbalance&#8217;), $factor);</p>
<p>ReS©</p>
<p>test:<br />
original: <a href="http://narod.ru/disk/11543277000/0.png.html" rel="nofollow">http://narod.ru/disk/11543277000/0.png.html</a><br />
$factor=array(&#8220;44&#8243;,&#8221;138,&#8221;44&#8243;);<br />
$po-&gt;pixelOperation($image, $img2, array($po, &#8216;colortune&#8217;), $factor);<br />
$po-&gt;pixelOperation($img2, $img2, array($po, &#8216;adjustBrightness&#8217;), &#8220;-25&#8243;);<br />
$po-&gt;pixelOperation($img2, $img2, array($po, &#8216;gamma&#8217;), &#8220;1.5&#8243;);<br />
result: <a href="http://narod.ru/disk/11543243000/00.png.html" rel="nofollow">http://narod.ru/disk/11543243000/00.png.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikolay from Russia</title>
		<link>http://www.phpied.com/image-fun/#comment-71225</link>
		<dc:creator>Nikolay from Russia</dc:creator>
		<pubDate>Fri, 24 Jul 2009 21:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/image-fun/#comment-71225</guid>
		<description>Very good. Thank you!</description>
		<content:encoded><![CDATA[<p>Very good. Thank you!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

