Browse files

Clean up comments

  • Loading branch information...
1 parent ff0bed7 commit ef19e5727152ca9e79afd6a75cab9c947f68847c rmagick committed Oct 31, 2003
Showing with 7 additions and 1 deletion.
  1. +7 −1 examples/thumbnail.rb
8 examples/thumbnail.rb
@@ -4,6 +4,10 @@
puts <<END_INFO
This example demonstrates how to make a thumbnail of an image.
+An image is resized to the target size (retaining its original
+aspect ratio, of course) and then "mounted" on a square background
+with raised edges.
ruby thumbnail.rb <filename <size>>
@@ -31,7 +35,9 @@
geom = "#{size}x#{size}"
-# Read the image and resize it.
+# Read the image and resize it. The `change_geometry' method
+# computes the new image geometry and yields to a block. The
+# return value of the block is the return value of the method.
img =[0]
img = img.change_geometry(geom) { |cols, rows| img.thumbnail(cols, rows) }

0 comments on commit ef19e57

Please sign in to comment.