<?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: Drop Shadows with GD Library</title>
	<atom:link href="http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/</link>
	<description>BolducPress is the blog of Joshua Bolduc, founder of the company - Part Digital Design</description>
	<lastBuildDate>Fri, 07 Oct 2011 15:52:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Simon</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-45255</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Wed, 13 Apr 2011 03:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-45255</guid>
		<description>Here I did a function that applies an innershadow without the need of photoshop. It could be modified slightly for a dropshadow:

function applyInnerShadow($im){
	$sh_size = 15;#the size of the shadow
	$sh_alpha = 60;#opacity from 1 to 127
	
	$imgw = imagesx($im);
	$imgh = imagesy($im);
	
	for($i=0; $i&lt;$sh_size; $i++){
		
		$shade_alpha = 127-round($sh_alpha*($sh_size-$i)/$sh_size);
		
		$shade = imagecolorallocatealpha($im, 0, 0, 0, $shade_alpha);
		
		imagefilledrectangle($im, 1+$i, 0+$i, $imgw-1-$i, 0+$i, $shade);#top
		imagefilledrectangle($im, 1+$i, $imgh-$i, $imgw-1-$i, $imgh-$i, $shade);#bottom
		imagefilledrectangle($im, 0+$i, 0+$i, 0+$i, $imgh-$i, $shade);#left
		imagefilledrectangle($im, $imgw-$i, 0+$i, $imgw-$i, $imgh-$i, $shade);#right
		
	}
	
	return $im;
	
}</description>
		<content:encoded><![CDATA[<p>Here I did a function that applies an innershadow without the need of photoshop. It could be modified slightly for a dropshadow:</p>
<p>function applyInnerShadow($im){<br />
	$sh_size = 15;#the size of the shadow<br />
	$sh_alpha = 60;#opacity from 1 to 127</p>
<p>	$imgw = imagesx($im);<br />
	$imgh = imagesy($im);</p>
<p>	for($i=0; $i&lt;$sh_size; $i++){</p>
<p>		$shade_alpha = 127-round($sh_alpha*($sh_size-$i)/$sh_size);</p>
<p>		$shade = imagecolorallocatealpha($im, 0, 0, 0, $shade_alpha);</p>
<p>		imagefilledrectangle($im, 1+$i, 0+$i, $imgw-1-$i, 0+$i, $shade);#top<br />
		imagefilledrectangle($im, 1+$i, $imgh-$i, $imgw-1-$i, $imgh-$i, $shade);#bottom<br />
		imagefilledrectangle($im, 0+$i, 0+$i, 0+$i, $imgh-$i, $shade);#left<br />
		imagefilledrectangle($im, $imgw-$i, 0+$i, $imgw-$i, $imgh-$i, $shade);#right</p>
<p>	}</p>
<p>	return $im;</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Crissaegrim</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-12186</link>
		<dc:creator>Crissaegrim</dc:creator>
		<pubDate>Sat, 25 Sep 2010 23:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-12186</guid>
		<description>Thanks a lot for this approach! However adding twice shadow width to canvas width wasn&#039;t necessary for me.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this approach! However adding twice shadow width to canvas width wasn&#8217;t necessary for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-407</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Sat, 27 Jun 2009 15:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-407</guid>
		<description>I found it easier to save the whole Photoshop-generated dropshadow image as a single png template instead of separate slices. In my PHP script I then used GD&#039;s imagecopy() function to copy the corners of the template onto a re-sized canvas, and filled-in along the sides with an appropriate slice of shadow. The source image was then overlaid to complete the job.</description>
		<content:encoded><![CDATA[<p>I found it easier to save the whole Photoshop-generated dropshadow image as a single png template instead of separate slices. In my PHP script I then used GD&#8217;s imagecopy() function to copy the corners of the template onto a re-sized canvas, and filled-in along the sides with an appropriate slice of shadow. The source image was then overlaid to complete the job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joern</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-270</link>
		<dc:creator>Joern</dc:creator>
		<pubDate>Thu, 12 Feb 2009 16:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-270</guid>
		<description>absolutely fabulous, thanks again for this great tutorial. Especially providing everything from image files and &quot;3d&quot; graphics for understanding!</description>
		<content:encoded><![CDATA[<p>absolutely fabulous, thanks again for this great tutorial. Especially providing everything from image files and &#8220;3d&#8221; graphics for understanding!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saeed</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-248</link>
		<dc:creator>Saeed</dc:creator>
		<pubDate>Wed, 03 Dec 2008 14:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-248</guid>
		<description>Nice tutorial! thanks alot. :)</description>
		<content:encoded><![CDATA[<p>Nice tutorial! thanks alot. <img src='http://www.bolducpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurens</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-230</link>
		<dc:creator>Laurens</dc:creator>
		<pubDate>Wed, 05 Nov 2008 20:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-230</guid>
		<description>i finally know how to use slices in PS now ^_^
To use gd for generating the entire image (including the graphics)  creates an enormous server load and the quality of the output image seems to be less then the original. I would advise to generate the shadow seperate from the image and place it as a background behind the image in the web page. This way the file size is a lot smaller, png can be used for alpha transparency and it wil break down nicer when the server doesn&#039;t support GD (e.g. no shadow, instead of no image at all)</description>
		<content:encoded><![CDATA[<p>i finally know how to use slices in PS now ^_^<br />
To use gd for generating the entire image (including the graphics)  creates an enormous server load and the quality of the output image seems to be less then the original. I would advise to generate the shadow seperate from the image and place it as a background behind the image in the web page. This way the file size is a lot smaller, png can be used for alpha transparency and it wil break down nicer when the server doesn&#8217;t support GD (e.g. no shadow, instead of no image at all)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grzesiek</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-198</link>
		<dc:creator>Grzesiek</dc:creator>
		<pubDate>Sun, 06 Jul 2008 15:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-198</guid>
		<description>of course there&#039;s a way to create script which will return SIMILAR effect using ONLY php; however, my only idea to do it so is to connect some pictures using tables/divs combination with their backgrounds set to shadow.</description>
		<content:encoded><![CDATA[<p>of course there&#8217;s a way to create script which will return SIMILAR effect using ONLY php; however, my only idea to do it so is to connect some pictures using tables/divs combination with their backgrounds set to shadow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NetJunky</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-160</link>
		<dc:creator>NetJunky</dc:creator>
		<pubDate>Thu, 10 Jan 2008 09:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-160</guid>
		<description>Hello! Im sorry but i am not so good with PHP. If you can, help please.</description>
		<content:encoded><![CDATA[<p>Hello! Im sorry but i am not so good with PHP. If you can, help please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandnew</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-43</link>
		<dc:creator>Brandnew</dc:creator>
		<pubDate>Sat, 30 Jun 2007 21:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-43</guid>
		<description>Thank you so much for the script ! That&#039;s a great way to do it ! I guess there&#039;s not a way to use only PHP to create, with a function or something, the shadow ? Anyway, thank you !</description>
		<content:encoded><![CDATA[<p>Thank you so much for the script ! That&#8217;s a great way to do it ! I guess there&#8217;s not a way to use only PHP to create, with a function or something, the shadow ? Anyway, thank you !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AGMJ</title>
		<link>http://www.bolducpress.com/tutorials/drop-shadows-with-gd-library/comment-page-1/#comment-24</link>
		<dc:creator>AGMJ</dc:creator>
		<pubDate>Thu, 21 Jun 2007 16:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.bolducpress.com/?p=163#comment-24</guid>
		<description>ohh! man ur just great!!so that was how it was done?cool thxwhat about a tute on how to make that &quot;desintegrate&quot; effect on ur logo?</description>
		<content:encoded><![CDATA[<p>ohh! man ur just great!!so that was how it was done?cool thxwhat about a tute on how to make that &#8220;desintegrate&#8221; effect on ur logo?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

