<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bemoko&#039;s blog on mobile &#187; shadow</title>
	<atom:link href="http://blog.bemoko.com/tag/shadow/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bemoko.com</link>
	<description>mobile made simple</description>
	<lastBuildDate>Wed, 25 Jan 2012 13:32:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Add Shadow and Border to Images with ImageMagick</title>
		<link>http://blog.bemoko.com/2009/07/01/add-shadow-and-border-to-images-with-imagemagick/</link>
		<comments>http://blog.bemoko.com/2009/07/01/add-shadow-and-border-to-images-with-imagemagick/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 14:15:11 +0000</pubDate>
		<dc:creator>Ian Homer</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shadow]]></category>

		<guid isPermaLink="false">http://blog.bemoko.com/?p=488</guid>
		<description><![CDATA[We&#8217;ve started using a quick ImageMagick script to add shadows and borders to images. Useful for making screen shots stand out a little clearer on our blog and wiki. For example, in a unix shell, create the function below (either by cutting and pasting the code into your shell window or adding to you shell [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve started using a quick <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a> script to add shadows and borders to images.  Useful for making screen shots stand out a little clearer on our blog and <a href="http://bemoko.com/wiki">wiki</a>.</p>
<p>For example, in a unix shell, create the function below (either by cutting and pasting the code into your shell window or adding to you shell init scripts) :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">image-shadow <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #007800;">out</span>=<span style="color: #800000;">${1%.*}</span>-shadow.<span style="color: #800000;">${1#*.}</span>
  <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">in</span></span>=$<span style="color: #000000;">1</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Converted file : <span style="color: #007800;">$out</span>&quot;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-z</span> $<span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span> 
    convert <span style="color: #007800;">$in</span> <span style="color: #660033;">-frame</span> $<span style="color: #000000;">2</span> <span style="color: #007800;">$out</span>
    <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">in</span></span>=<span style="color: #007800;">$out</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
  convert <span style="color: #007800;">$in</span> \<span style="color: #7a0874; font-weight: bold;">&#40;</span> +clone <span style="color: #660033;">-background</span> black <span style="color: #660033;">-shadow</span> 60x5+<span style="color: #000000;">10</span>+<span style="color: #000000;">10</span> \<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    +swap <span style="color: #660033;">-background</span> white <span style="color: #660033;">-layers</span> merge +repage <span style="color: #007800;">$out</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>and then run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">image-shadow myimage.png</pre></div></div>

<p>to add a shadow to the image &#8230; or run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">image-shadow myimage.png 6x6</pre></div></div>

<p>to add a shadow and 6 pixel border.</p>
<p>Very simple to get images like &#8230;</p>
<p><img src="http://blog.bemoko.com/wp-content/uploads/2009/07/mex-shadow.png" alt="Mex 2009 mobile web site" title="mex-shadow" width="450" height="231" class="size-full wp-image-489" /></p>
<p>More examples and details on our wiki @ <a href="http://bemoko.com/wiki/ImageMagick">http://bemoko.com/wiki/ImageMagick</a>.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F&amp;title=Add%20Shadow%20and%20Border%20to%20Images%20with%20ImageMagick&amp;bodytext=We%27ve%20started%20using%20a%20quick%20ImageMagick%20script%20to%20add%20shadows%20and%20borders%20to%20images.%20%20Useful%20for%20making%20screen%20shots%20stand%20out%20a%20little%20clearer%20on%20our%20blog%20and%20wiki.%0D%0A%0D%0AFor%20example%2C%20in%20a%20unix%20shell%2C%20create%20the%20function%20below%20%28either%20by%20cutting%20and%20pa" title="Digg"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F" title="Sphinn"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F&amp;title=Add%20Shadow%20and%20Border%20to%20Images%20with%20ImageMagick&amp;notes=We%27ve%20started%20using%20a%20quick%20ImageMagick%20script%20to%20add%20shadows%20and%20borders%20to%20images.%20%20Useful%20for%20making%20screen%20shots%20stand%20out%20a%20little%20clearer%20on%20our%20blog%20and%20wiki.%0D%0A%0D%0AFor%20example%2C%20in%20a%20unix%20shell%2C%20create%20the%20function%20below%20%28either%20by%20cutting%20and%20pa" title="del.icio.us"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F&amp;t=Add%20Shadow%20and%20Border%20to%20Images%20with%20ImageMagick" title="Facebook"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F&amp;title=Add%20Shadow%20and%20Border%20to%20Images%20with%20ImageMagick" title="Mixx"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fadd-shadow-and-border-to-images-with-imagemagick%2F&amp;title=Add%20Shadow%20and%20Border%20to%20Images%20with%20ImageMagick&amp;annotation=We%27ve%20started%20using%20a%20quick%20ImageMagick%20script%20to%20add%20shadows%20and%20borders%20to%20images.%20%20Useful%20for%20making%20screen%20shots%20stand%20out%20a%20little%20clearer%20on%20our%20blog%20and%20wiki.%0D%0A%0D%0AFor%20example%2C%20in%20a%20unix%20shell%2C%20create%20the%20function%20below%20%28either%20by%20cutting%20and%20pa" title="Google Bookmarks"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bemoko.com/2009/07/01/add-shadow-and-border-to-images-with-imagemagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

