<?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; ImageMagick</title>
	<atom:link href="http://blog.bemoko.com/tag/imagemagick/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bemoko.com</link>
	<description>mobile made simple</description>
	<lastBuildDate>Thu, 19 Aug 2010 13:58:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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>
]]></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>
