<?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: validate image dimensions with paperclip</title>
	<atom:link href="http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=validate-image-dimensions-with-paperclip</link>
	<description></description>
	<lastBuildDate>Mon, 06 Sep 2010 20:08:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: aji</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-354</link>
		<dc:creator>aji</dc:creator>
		<pubDate>Thu, 15 Jul 2010 11:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-354</guid>
		<description>many thanks for this</description>
		<content:encoded><![CDATA[<p>many thanks for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohan</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-353</link>
		<dc:creator>Rohan</dc:creator>
		<pubDate>Mon, 12 Jul 2010 20:44:49 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-353</guid>
		<description>Ohh thanks...googling helped me land on this quickly and did the job for me</description>
		<content:encoded><![CDATA[<p>Ohh thanks&#8230;googling helped me land on this quickly and did the job for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-284</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Tue, 30 Mar 2010 00:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-284</guid>
		<description>Thanks for posting the tip Jamie!</description>
		<content:encoded><![CDATA[<p>Thanks for posting the tip Jamie!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Flournoy</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-283</link>
		<dc:creator>Jamie Flournoy</dc:creator>
		<pubDate>Mon, 29 Mar 2010 18:21:16 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-283</guid>
		<description>Identify hangs when Paperclip invokes it like this:

identify -format &quot;%wx%h&quot; &quot;&quot;[0] 2&gt; /dev/null

note the &quot;&quot; before [0]. Identify sees this:

identify -format %wx%h [0]

and never does anything.

To avoid this make sure you don&#039;t pass a null to from_file. Inside the validate method add this condition around the code above:

def validate
  if self.image &amp;&amp; self.image.queued_for_write[:original]
    # ... dimensions = etc etc
  end
end

and it will stop hanging.</description>
		<content:encoded><![CDATA[<p>Identify hangs when Paperclip invokes it like this:</p>
<p>identify -format &#8220;%wx%h&#8221; &#8220;&#8221;[0] 2&gt; /dev/null</p>
<p>note the &#8220;&#8221; before [0]. Identify sees this:</p>
<p>identify -format %wx%h [0]</p>
<p>and never does anything.</p>
<p>To avoid this make sure you don&#8217;t pass a null to from_file. Inside the validate method add this condition around the code above:</p>
<p>def validate<br />
  if self.image &amp;&amp; self.image.queued_for_write[:original]<br />
    # &#8230; dimensions = etc etc<br />
  end<br />
end</p>
<p>and it will stop hanging.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-69</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Thu, 15 Oct 2009 23:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-69</guid>
		<description>@Dave can you post your test code too?</description>
		<content:encoded><![CDATA[<p>@Dave can you post your test code too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Mauldin</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-68</link>
		<dc:creator>Dave Mauldin</dc:creator>
		<pubDate>Thu, 15 Oct 2009 22:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-68</guid>
		<description>The code can be seen at http://gist.github.com/211365</description>
		<content:encoded><![CDATA[<p>The code can be seen at <a href="http://gist.github.com/211365" rel="nofollow">http://gist.github.com/211365</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Mauldin</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-67</link>
		<dc:creator>Dave Mauldin</dc:creator>
		<pubDate>Thu, 15 Oct 2009 22:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-67</guid>
		<description>So I&#039;m trying to do something similar but running into an issue while running tests.  The method you&#039;ve posted causes tests to hang in Paperclip::Geometry.  I even tried just doing a basic piece of code that just gets dimensions after a save.



Also causes tests to hang.  Can&#039;t find any information anywhere on why this is happening and was hoping if you&#039;d experienced it, you&#039;d worked around it.</description>
		<content:encoded><![CDATA[<p>So I&#8217;m trying to do something similar but running into an issue while running tests.  The method you&#8217;ve posted causes tests to hang in Paperclip::Geometry.  I even tried just doing a basic piece of code that just gets dimensions after a save.</p>
<p>Also causes tests to hang.  Can&#8217;t find any information anywhere on why this is happening and was hoping if you&#8217;d experienced it, you&#8217;d worked around it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://dev.elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip/comment-page-1/#comment-38</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 30 Sep 2009 16:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://elevationblog.com/2009/01/31/validate-image-dimensions-with-paperclip#comment-38</guid>
		<description>I wish i googled this before i went through the trouble of building it manually.  thanks!</description>
		<content:encoded><![CDATA[<p>I wish i googled this before i went through the trouble of building it manually.  thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
