<?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>Think Bohemian &#187; RMagick</title>
	<atom:link href="http://www.thinkbohemian.com/category/rmagick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkbohemian.com</link>
	<description>Secede from Convention in Life and Code</description>
	<lastBuildDate>Tue, 31 Aug 2010 23:37:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Crazy Easy Intro to RMagick with Ruby on Rails</title>
		<link>http://www.thinkbohemian.com/2009/08/28/crazy-easy-intro-to-rmagick-with-ruby-on-rails/</link>
		<comments>http://www.thinkbohemian.com/2009/08/28/crazy-easy-intro-to-rmagick-with-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 21:56:04 +0000</pubDate>
		<dc:creator>Richard Schneeman</dc:creator>
				<category><![CDATA[RMagick]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.thinkbohemian.com/?p=51</guid>
		<description><![CDATA[So, you&#8217;ve go ruby on rails up and running, and now you&#8217;ve installed rmagick, and you want to manipulate some images. Grab an image, throw it in your public folder, lets call it myimage.jpg. Run script/server to start your server, and in a controller somewhere put this:

require 'RMagick'

def show
image  = Magick::ImageList.new(&#8220;public/images/myimage.jpg&#8221;)
image   = image.rotate(90)
image.write(&#8220;public/images/myimage.jpg&#8221;)
end
then in your [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;ve go ruby on rails up and running, and now you&#8217;ve installed rmagick, and you want to manipulate some images. Grab an image, throw it in your public folder, lets call it <strong>myimage.jpg</strong>. Run <strong>script/server</strong> to start your server, and in a controller somewhere put this:</p>
<blockquote>
<pre>require 'RMagick'</pre>
</blockquote>
<blockquote><p>def show</p>
<p>image  = Magick::ImageList.new(&#8220;public/images/<strong>myimage</strong>.jpg&#8221;)<br />
image   = image.rotate(90)<br />
image.write(&#8220;public/images/<strong>myimage</strong>.jpg&#8221;)</p>
<p>end</p></blockquote>
<p>then in your <strong>show.html.erb</strong> you can show your picture:</p>
<blockquote><p><code>&lt;br /&gt;
&lt;img src = &quot;/images/&lt;strong&gt;myimage&lt;/strong&gt;.jpg&quot; /&gt;</code></p></blockquote>
<p>Every time you load the page you should see your image rotated by 90 degrees. This tutorial actually took me longer to write out then to complete, even so I hope this maybe helps someone else getting started out with this powerful program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkbohemian.com/2009/08/28/crazy-easy-intro-to-rmagick-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
