<?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>dan.thoughts &#187; images</title>
	<atom:link href="http://blog.sosedoff.com/tag/images/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sosedoff.com</link>
	<description>Web-development, PHP, Ruby, Sinatra, Merb, Rails, MySQL, SQLite, Web Services.</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:54:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Amazon product images on your website</title>
		<link>http://blog.sosedoff.com/2010/06/15/using-amazon-product-images-on-your-website/</link>
		<comments>http://blog.sosedoff.com/2010/06/15/using-amazon-product-images-on-your-website/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 06:20:17 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ecs]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=237</guid>
		<description><![CDATA[Amazon has an awesome image service. You can use their product images on your site, adjusting them for you needs. All you have to know &#8211; one image url of your product. Having that string will provide you an access to its dynamic image scaling service which i had to use recently. 
So, lets say [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon has an awesome image service. You can use their product images on your site, adjusting them for you needs. All you have to know &#8211; one image url of your product. Having that string will provide you an access to its dynamic image scaling service which i had to use recently. </p>
<p>So, lets say you have books on your website, but you dont have any good images for them. There is 2 ways to solve your problem: 1) download it from whatever place and resize 2) use amazon!</p>
<p>Here goes small overview.</p>
<p>Unfortunately, i didnt have any time to play with image service for different countries, but i assume that wont change that much.  Lets take a look on a regular image:</p>
<p>http://ecx.images-amazon.com/images/I/41ygBmdaIfL._SL500_SS100_.jpg</p>
<p>It has different parts:<br />
1) URL base: http://ecx.images-amazon.com/images/I/<br />
2) Image code: 41ygBmdaIfL<br />
3) Size format (surrounded by underscores): _SL500_SS100_<br />
4) Format: jpg/gif/png</p>
<p>Some words about image format. It can vary from square thumbnails to images with specific max width and height. For example: _SX100_ will produce image that 100 pixels wide, height will be calculated proportionally. SH100 will give opposite result, scaled by 100 pixels maximum height, SS100 &#8211; 100&#215;100 pixels thumbnail. And so on, you can find other similar crop codes while exploring amazon store on different pages, all you need is to take a look on image sources. </p>
<p>Now, we need to use this with Ruby:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/http'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> Amazon
  <span style="color:#008000; font-style:italic;"># parse amazon image url and get image code and extension</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">parse_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span>
    result = url.<span style="color:#9900CC;">scan</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>^http:\<span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">/</span>ecx.<span style="color:#9900CC;">images</span><span style="color:#006600; font-weight:bold;">-</span>amazon.<span style="color:#9900CC;">com</span>\<span style="color:#006600; font-weight:bold;">/</span>images\<span style="color:#006600; font-weight:bold;">/</span>I\<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>a<span style="color:#006600; font-weight:bold;">-</span>z0<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span>\<span style="color:#006600; font-weight:bold;">-</span>\<span style="color:#006600; font-weight:bold;">%</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006666;">1</span>,<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#40;</span>.<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006600; font-weight:bold;">&#41;</span>_.<span style="color:#006600; font-weight:bold;">&#40;</span>jpg<span style="color:#006600; font-weight:bold;">|</span>jpeg<span style="color:#006600; font-weight:bold;">|</span>gif<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span>i<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">unless</span> result.<span style="color:#0000FF; font-weight:bold;">nil</span>?
      <span style="color:#9966CC; font-weight:bold;">unless</span> result<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
        match = result.<span style="color:#9900CC;">first</span>
        <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:code <span style="color:#006600; font-weight:bold;">=&gt;</span> match.<span style="color:#9900CC;">first</span>.<span style="color:#9900CC;">to_s</span>, <span style="color:#ff3333; font-weight:bold;">:extension</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> match.<span style="color:#9900CC;">last</span>.<span style="color:#9900CC;">to_s</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># make a new amazon image url based on code and size</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">make_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>image, size<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#996600;">&quot;http://ecx.images-amazon.com/images/I/#{image[:code]}._#{size.upcase}.#{image[:extension]}&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># check if actual image exists</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">check_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">begin</span>
      uri = <span style="color:#CC00FF; font-weight:bold;">URI</span>.<span style="color:#9900CC;">parse</span><span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span>
      req = <span style="color:#6666ff; font-weight:bold;">Net::HTTP::Get</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>uri.<span style="color:#9900CC;">path</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      res = <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span>uri.<span style="color:#9900CC;">host</span>, uri.<span style="color:#9900CC;">port</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>http<span style="color:#006600; font-weight:bold;">|</span> http.<span style="color:#9900CC;">request</span><span style="color:#006600; font-weight:bold;">&#40;</span>req<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
      <span style="color:#0000FF; font-weight:bold;">return</span> res.<span style="color:#9900CC;">code</span> == <span style="color:#996600;">'200'</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> res.<span style="color:#9900CC;">content_length</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span>
    <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">Exception</span>
      <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And usage:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">url = <span style="color:#996600;">'http://ecx.images-amazon.com/images/I/51O65dIoZCL._SX117_.jpg'</span>
info = Amazon.<span style="color:#9900CC;">parse_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>url<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">unless</span> info.<span style="color:#0000FF; font-weight:bold;">nil</span>?
  new_url = Amazon.<span style="color:#9900CC;">make_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>info, <span style="color:#996600;">'sx100'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> Amazon.<span style="color:#9900CC;">check_image</span><span style="color:#006600; font-weight:bold;">&#40;</span>new_url<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Cool! Resized image: #{new_url}&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">else</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Sorry, this image does not exist!&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">else</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Cant identify image!&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Some notes about the process. The only reason why method &#8220;check_image&#8221; uses GET method instead of HEAD is because if image cannot be generated or not found in amazon`s cache the response is still valid sometimes. I`ve checked it on 50k images and sometimes HEAD request indicates that response is valid while it not supposed to. Otherwise i would use HEAD.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2010/06/15/using-amazon-product-images-on-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling images with RMagick</title>
		<link>http://blog.sosedoff.com/2009/03/14/scaling-images-with-rmagick/</link>
		<comments>http://blog.sosedoff.com/2009/03/14/scaling-images-with-rmagick/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 07:37:03 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[rmagick]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=98</guid>
		<description><![CDATA[Simple class that providing scaling (rectangle and thumbnails) for images using RMagick and Ruby.
Code:

class ImageScale
    def change_geometry&#40;sz,value&#41;
        w = sz&#91;0&#93; ; h = sz&#91;1&#93;
            if w &#62; h
       [...]]]></description>
			<content:encoded><![CDATA[<p>Simple class that providing scaling (rectangle and thumbnails) for images using <a href="http://rmagick.rubyforge.org/">RMagick</a> and Ruby.<br />
Code:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> ImageScale
    <span style="color:#9966CC; font-weight:bold;">def</span> change_geometry<span style="color:#006600; font-weight:bold;">&#40;</span>sz,value<span style="color:#006600; font-weight:bold;">&#41;</span>
        w = sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> ; h = sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>
            <span style="color:#9966CC; font-weight:bold;">if</span> w <span style="color:#006600; font-weight:bold;">&gt;</span> h
                sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> = value
                sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>value <span style="color:#006600; font-weight:bold;">*</span> h<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">/</span> w<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">floor</span>
            <span style="color:#9966CC; font-weight:bold;">else</span>
                sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> = value
                sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span>value <span style="color:#006600; font-weight:bold;">*</span> w<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">/</span> h<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">floor</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
            <span style="color:#0000FF; font-weight:bold;">return</span> sz
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> make_rect<span style="color:#006600; font-weight:bold;">&#40;</span>file_in,file_out, width, quality=<span style="color:#006666;">85</span>, sharp=<span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span> 
        <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">FileTest</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>file_in<span style="color:#006600; font-weight:bold;">&#41;</span>
            <span style="color:#9966CC; font-weight:bold;">begin</span>
                img = <span style="color:#6666ff; font-weight:bold;">Magick::Image</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span>file_in<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">first</span>
                img.<span style="color:#9900CC;">crop_resized</span>!<span style="color:#006600; font-weight:bold;">&#40;</span>width,width, <span style="color:#6666ff; font-weight:bold;">Magick::CenterGravity</span><span style="color:#006600; font-weight:bold;">&#41;</span>
                img = img.<span style="color:#9900CC;">sharpen</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0.5</span>, <span style="color:#006666;">0.5</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> sharp
                img.<span style="color:#9900CC;">write</span><span style="color:#006600; font-weight:bold;">&#40;</span>file_out<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">quality</span> = quality <span style="color:#006600; font-weight:bold;">&#125;</span>
                <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">true</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">FileTest</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>file_out<span style="color:#006600; font-weight:bold;">&#41;</span>
            <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#6666ff; font-weight:bold;">Magick::ImageMagickError</span>
                <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">def</span> make_thumb<span style="color:#006600; font-weight:bold;">&#40;</span>file_in,file_out, width_to, quality=<span style="color:#006666;">85</span>, sharp=<span style="color:#0000FF; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span> 
        <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">FileTest</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>file_in<span style="color:#006600; font-weight:bold;">&#41;</span>
            <span style="color:#9966CC; font-weight:bold;">begin</span>
                img = <span style="color:#6666ff; font-weight:bold;">Magick::Image</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span>file_in<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">first</span>
                info = <span style="color:#006600; font-weight:bold;">&#91;</span>img.<span style="color:#9900CC;">columns</span>,img.<span style="color:#9900CC;">rows</span><span style="color:#006600; font-weight:bold;">&#93;</span>
                sz = change_geometry<span style="color:#006600; font-weight:bold;">&#40;</span>info, width_to<span style="color:#006600; font-weight:bold;">&#41;</span>
                img = img.<span style="color:#9900CC;">resize</span><span style="color:#006600; font-weight:bold;">&#40;</span>sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>,sz<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
                img = img.<span style="color:#9900CC;">sharpen</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0.5</span>, <span style="color:#006666;">0.5</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> sharp
                img.<span style="color:#9900CC;">write</span><span style="color:#006600; font-weight:bold;">&#40;</span>file_out<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">quality</span> = quality <span style="color:#006600; font-weight:bold;">&#125;</span>
                <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">true</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#CC00FF; font-weight:bold;">FileTest</span>.<span style="color:#9900CC;">exists</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>file_out<span style="color:#006600; font-weight:bold;">&#41;</span>
            <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#6666ff; font-weight:bold;">Magick::ImageMagickError</span>
                <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#0000FF; font-weight:bold;">false</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Ok, let`s see how this class working. For example, we have source image:<br />
<a href="http://blog.sosedoff.com/wp-content/uploads/2009/03/5622797_ufo05.jpg"><img src="http://blog.sosedoff.com/wp-content/uploads/2009/03/5622797_ufo05.jpg" alt="Source Image" title="Source Image" width="358" height="280" class="alignnone size-full wp-image-99" /></a></p>
<p>Function <b>ImageScale.make_rect(src,dest,64)</b> will produce such image:<br />
<a href="http://blog.sosedoff.com/wp-content/uploads/2009/03/64_5622797_ufo05.jpg"><img src="http://blog.sosedoff.com/wp-content/uploads/2009/03/64_5622797_ufo05.jpg" alt="Rectangle Image" title="Rectangle Image" width="64" height="64" class="alignnone size-full wp-image-100" /></a></p>
<p>Function <b>ImageScale.make_thumb(src,dest,200)</b> will produce thumbnail:<br />
<a href="http://blog.sosedoff.com/wp-content/uploads/2009/03/thumb_5622797_ufo05.jpg"><img src="http://blog.sosedoff.com/wp-content/uploads/2009/03/thumb_5622797_ufo05.jpg" alt="Thumbnail Image" title="Thumbnail Image" width="200" height="156" class="alignnone size-full wp-image-101" /></a></p>
<p>There is optional parameter <i>sharp</i> to use sharping. Optional parameter <i>quality</i> is set to 85% compression value. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2009/03/14/scaling-images-with-rmagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

