Title: [1051] trunk/image_voodoo/lib/image_voodoo.rb: Make scale work properly
Revision
1051
Author
enebo
Date
2008-07-19 01:10:23 -0400 (Sat, 19 Jul 2008)

Log Message

Make scale work properly

Modified Paths


Diff

Modified: trunk/image_voodoo/lib/image_voodoo.rb (1050 => 1051)


--- trunk/image_voodoo/lib/image_voodoo.rb	2008-07-19 03:41:01 UTC (rev 1050)
+++ trunk/image_voodoo/lib/image_voodoo.rb	2008-07-19 05:10:23 UTC (rev 1051)
@@ -217,7 +217,8 @@
   # edge is resized to size and yields/returns the new image. 
   #
   def thumbnail(size)
-    scale(size.to_f / (width > height ? width : height))
+    target = scale(size.to_f / (width > height ? width : height))
+    block_given? ? yield(target) : target
   end
 
   #
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to