doc/comtasks.html in rmagick-2.0.0 vs doc/comtasks.html in rmagick-2.1.0

- old
+ new

@@ -2,13 +2,13 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="generator" content= - "HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" /> + "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" /> - <title>RMagick 2.0.0: Common Tasks</title> + <title>RMagick 2.1.0: Common Tasks</title> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii" /> <meta name="GENERATOR" content="Quanta Plus" /> <meta name="Copyright" content= "Copyright (C) 2006 by Timothy P. Hunter" /> @@ -29,11 +29,11 @@ /*]]>*/ </style> </head> <body> - <h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6> + <h6 id="header">RMagick 2.1.0 User's Guide and Reference</h6> <div class="nav"> &laquo;&nbsp;<a href="optequiv.html">Prev</a> | <a href= "index.html">Contents</a> | <a href= "magick.html">Next</a>&nbsp;&raquo; @@ -151,10 +151,22 @@ <p>The <code>thumbnail</code> method is faster than <code>resize</code> if the thumbnail is less than 10% of the size of the original image.</p> + <h3>flickr-style thumbnails</h3> + + <p><a href="http://www.flickr.com">flickr</a> thumbnails are 75 + pixels wide and 75 pixels tall. If the original image isn't + square, the thumbnail is cropped in its larger dimension so that + the image isn't distorted. You can get make this kind of + thumbnail with the <a href= + "image3.html#resize_to_fill">resize_to_fill</a> method.</p> + <pre class="example"> +thumb = img.resize_to_fill(75, 75) +</pre> + <h2 id="resizing">Resizing to a maximum (or minimum) size</h2> <p>Say you need to make all your thumbnails no bigger than 64x64 but with the same aspect ratio as the original. Or, you don't want to resize the image if it's already smaller than 64x64. The @@ -175,10 +187,19 @@ values. Typically you'll call one of the resize methods mentioned in the previous section and make the resized image the return value from the block. The <code>change_geometry</code> method then returns that value to its caller.</p> + <h3>Simple thumbnails</h3> + + <p>If you just want to make sure your thumbnail is no bigger than + a certain width and height, use the <a href= + "image3.html#resize_to_fit">resize_to_fit</a> method.</p> + <pre class="example"> +thumb = img.resize_to_fit(75, 75) +</pre> + <h2><a id="blob" name="blob">Writing to or reading from a string instead of a file</a></h2> <p>Use the <a href="image1.html#from_blob">Image.from_blob</a> method to construct an Image object from a string. Use the @@ -253,10 +274,10 @@ "ex/drop_shadow.gif" title="Click to see the example script" alt="drop shadow example" /></a> </div> <hr /> - <p class="spacer"> </p> + <p class="spacer"></p> <div class="nav"> &laquo; <a href="optequiv.html">Prev</a> | <a href= "index.html">Contents</a> | <a href="magick.html">Next</a> &raquo;