<?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 to html via php</title>
	<atom:link href="http://skycube.net/2009/02/14/28/feed/" rel="self" type="application/rss+xml" />
	<link>http://skycube.net/2009/02/14/28/</link>
	<description>Projects, References and Personals by Per Lasse Baasch</description>
	<lastBuildDate>Wed, 07 Sep 2011 23:10:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rdcchvmy</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-5286</link>
		<dc:creator>Rdcchvmy</dc:creator>
		<pubDate>Wed, 07 Sep 2011 23:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-5286</guid>
		<description>What line of work are you in? &lt;a href=&quot;http://www.flickr.com/people/57254768@N02&quot; rel=&quot;nofollow&quot;&gt;pedo kids video&lt;/a&gt;  ljwz</description>
		<content:encoded><![CDATA[<p>What line of work are you in? <a href="http://www.flickr.com/people/57254768@N02" rel="nofollow">pedo kids video<br />
</a>  ljwz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wlxnbxgp</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-5285</link>
		<dc:creator>Wlxnbxgp</dc:creator>
		<pubDate>Tue, 06 Sep 2011 19:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-5285</guid>
		<description>How much does the job pay? &lt;a href=&quot;http://www.flickr.com/people/57182957@N05&quot; rel=&quot;nofollow&quot;&gt;nude lolitas&lt;/a&gt;  &gt;:((</description>
		<content:encoded><![CDATA[<p>How much does the job pay? <a href="http://www.flickr.com/people/57182957@N05" rel="nofollow">nude lolitas<br />
</a>  &gt;:((</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sgaherth</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-5284</link>
		<dc:creator>Sgaherth</dc:creator>
		<pubDate>Sun, 04 Sep 2011 20:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-5284</guid>
		<description>I&#039;d like some euros &lt;a href=&quot;http://www.flickr.com/people/56946224@N04&quot; rel=&quot;nofollow&quot;&gt;tylene buck bikini&lt;/a&gt;  09783</description>
		<content:encoded><![CDATA[<p>I&#8217;d like some euros <a href="http://www.flickr.com/people/56946224@N04" rel="nofollow">tylene buck bikini</a>  09783</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Lasse Baasch</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-512</link>
		<dc:creator>Per Lasse Baasch</dc:creator>
		<pubDate>Tue, 10 Aug 2010 09:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-512</guid>
		<description>&lt;a href=&quot;#comment-511&quot; rel=&quot;nofollow&quot;&gt;@Mike&lt;/a&gt; 
Yes it&#039;s possible, but probably it will slow down. Cause the output of image functions is rgb and you&#039;ve to use a convert function like this:
http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml
&lt;pre lang=&#039;php&#039;&gt;
&lt;?php
function rgb2html($r, $g=-1, $b=-1)
{
    if (is_array($r) &amp;&amp; sizeof($r) == 3)
        list($r, $g, $b) = $r;

    $r = intval($r); $g = intval($g);
    $b = intval($b);

    $r = dechex($r&lt;0?0:($r&gt;255?255:$r));
    $g = dechex($g&lt;0?0:($g&gt;255?255:$g));
    $b = dechex($b&lt;0?0:($b&gt;255?255:$b));

    $color = (strlen($r) &lt; 2?&#039;0&#039;:&#039;&#039;).$r;
    $color .= (strlen($g) &lt; 2?&#039;0&#039;:&#039;&#039;).$g;
    $color .= (strlen($b) &lt; 2?&#039;0&#039;:&#039;&#039;).$b;
    return &#039;#&#039;.$color;
}
?&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-511" rel="nofollow">@Mike</a><br />
Yes it&#8217;s possible, but probably it will slow down. Cause the output of image functions is rgb and you&#8217;ve to use a convert function like this:<br />
<a href="http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml" rel="nofollow">http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml</a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> rgb2html<span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #339933;">,</span> <span style="color: #000088;">$g</span><span style="color: #339933;">=-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #339933;">=-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span>
        <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #339933;">,</span> <span style="color: #000088;">$g</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$r</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$r</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$g</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$g</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$b</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$r</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dechex</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">0</span>?<span style="color: #cc66cc;">0</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">255</span>?<span style="color: #cc66cc;">255</span><span style="color: #339933;">:</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$g</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dechex</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$g</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">0</span>?<span style="color: #cc66cc;">0</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$g</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">255</span>?<span style="color: #cc66cc;">255</span><span style="color: #339933;">:</span><span style="color: #000088;">$g</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$b</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dechex</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">0</span>?<span style="color: #cc66cc;">0</span><span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">255</span>?<span style="color: #cc66cc;">255</span><span style="color: #339933;">:</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$r</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span>?<span style="color: #0000ff;">'0'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$r</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$color</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$g</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span>?<span style="color: #0000ff;">'0'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$g</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$color</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span>?<span style="color: #0000ff;">'0'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$b</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">.</span><span style="color: #000088;">$color</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-511</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 06 Aug 2010 14:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-511</guid>
		<description>Hi, very usefull script, it´s possible change the RBG color to #HEX?</description>
		<content:encoded><![CDATA[<p>Hi, very usefull script, it´s possible change the RBG color to #HEX?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: plb</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-349</link>
		<dc:creator>plb</dc:creator>
		<pubDate>Fri, 11 Sep 2009 11:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-349</guid>
		<description>Using a screenshot program ;) Or print to a pdf file... may that works</description>
		<content:encoded><![CDATA[<p>Using a screenshot program <img src='http://skycube.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Or print to a pdf file&#8230; may that works</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ayaz</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-348</link>
		<dc:creator>ayaz</dc:creator>
		<pubDate>Tue, 08 Sep 2009 16:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-348</guid>
		<description>Hello
How can we create image from html i.e. I have a DIV tag and i want to take snapshot of contents in that div...how can we acheive it?</description>
		<content:encoded><![CDATA[<p>Hello<br />
How can we create image from html i.e. I have a DIV tag and i want to take snapshot of contents in that div&#8230;how can we acheive it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: plb</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-205</link>
		<dc:creator>plb</dc:creator>
		<pubDate>Sun, 12 Apr 2009 16:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-205</guid>
		<description>I looking forward to find one as well,... Beside, I try to optimize the script for faster loading.</description>
		<content:encoded><![CDATA[<p>I looking forward to find one as well,&#8230; Beside, I try to optimize the script for faster loading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-204</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Tue, 07 Apr 2009 15:29:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-204</guid>
		<description>Crazy idea - never thought about it because I wasn´t aware of that it´s possible.... now I´m thinking about a usecase :)</description>
		<content:encoded><![CDATA[<p>Crazy idea &#8211; never thought about it because I wasn´t aware of that it´s possible&#8230;. now I´m thinking about a usecase <img src='http://skycube.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gergely Kovacs</title>
		<link>http://skycube.net/2009/02/14/28/comment-page-1/#comment-169</link>
		<dc:creator>Gergely Kovacs</dc:creator>
		<pubDate>Mon, 23 Feb 2009 23:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.skycube.net/?p=28#comment-169</guid>
		<description>Hi!
I&#039;m a beginner in php programming, but your script helped me so much (in an other way), that I must say thank you :)
Greg</description>
		<content:encoded><![CDATA[<p>Hi!<br />
I&#8217;m a beginner in php programming, but your script helped me so much (in an other way), that I must say thank you <img src='http://skycube.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Greg</p>
]]></content:encoded>
	</item>
</channel>
</rss>

