doc/image2.html in rmagick-1.9.3 vs doc/image2.html in rmagick-1.10.0

- old
+ new

@@ -2,18 +2,18 @@ "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 March 2005), see www.w3.org" /> + "HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" /> <title>RMagick: class Image (instance methods, part 2)</title> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii" /> <meta name="GENERATOR" content="Quanta Plus" /> <meta name="Copyright" content= - "Copyright (C) 2005 by Timothy P. Hunter" /> + "Copyright (C) 2006 by Timothy P. Hunter" /> <link rel="stylesheet" type="text/css" href="css/doc.css" /> <script type="text/javascript" src="scripts/doc.js"> </script> <script type="text/javascript"> //<![CDATA[ @@ -53,10 +53,13 @@ <li><a href="#erase_bang">erase!</a></li> <li><a href="#export_pixels">export_pixels</a></li> + <li><a href= + "#export_pixels_to_str">export_pixels_to_str</a></li> + <li><a href="#flip">flip</a></li> <li><a href="#flip_bang">flip!</a></li> <li><a href="#flop">flop</a></li> @@ -77,17 +80,17 @@ <li><a href= "#get_exif_by_entry">get_exif_by_entry</a></li> <li><a href= "#get_exif_by_number">get_exif_by_number</a></li> - - <li><a href="#get_pixels">get_pixels</a></li> </ul> </div> <div class="toccol"> <ul> + <li><a href="#get_pixels">get_pixels</a></li> + <li><a href="#gray_q">gray?</a></li> <li><a href= "#grayscale_pseudo_class">grayscale_pseudo_class</a></li> @@ -262,13 +265,15 @@ <div class="sig"> <h3 id="export_pixels">export_pixels</h3> <p><span class="arg">image</span>.export_pixels(<span class= - "arg">x</span>, <span class="arg">y</span>, <span class= - "arg">columns</span>, <span class="arg">rows</span>, - <span class="arg">map</span>) -&gt; <em>anArray</em></p> + "arg">x</span>=0, <span class="arg">y</span>=0, <span class= + "arg">columns</span>=<span class="arg">image</span>.columns, + <span class="arg">rows</span>=<span class= + "arg">image</span>.rows, <span class="arg">map</span>="RGB") + -&gt; <em>anArray</em></p> </div> <div class="desc"> <h4>Description</h4> @@ -290,15 +295,16 @@ <dd>The width and height of the rectangle.</dd> <dt>map</dt> - <dd>A <code>String</code> reflecting the order of the pixel - data. <span class="imquote">It can be any combination or - order of R = red, G = green, B = blue, A = alpha, C = cyan, Y - = yellow, M = magenta, K = black, or I = intensity (for - grayscale).</span></dd> + <dd>A string that describes which pixel channel data is + desired and the order in which it should be stored. + <span class="imquote">It can be any combination or order of R + = red, G = green, B = blue, A = alpha, C = cyan, Y = yellow, + M = magenta, K = black, I = intensity (for grayscale), or P = + pad.</span></dd> </dl> <h4>Returns</h4>An array <h4>Example</h4> @@ -308,10 +314,11 @@ </pre> <h4>See also</h4> <p><a href="image1.html#dispatch">dispatch</a>, <a href= + "#export_pixels_to_str">export_pixels_to_str</a>, <a href= "#import_pixels">import_pixels</a>, <a href= "#get_pixels">get_pixels</a></p> <h4>Magick API</h4> @@ -321,10 +328,85 @@ <p>This method replaces the <code>dispatch</code> method.</p> </div> <div class="sig"> + <h3 id="export_pixels_to_str">export_pixels_to_str</h3> + + <p><span class= + "arg">image</span>.export_pixels_to_str(<span class= + "arg">x</span>=0, <span class="arg">y</span>=0, <span class= + "arg">columns</span>=<span class="arg">image</span>.columns, + <span class="arg">rows</span>=<span class= + "arg">image</span>.rows, <span class="arg">map</span>="RGB", + <span class="arg">type</span>=<code>Magick::CharPixel</code>) + -&gt; <em>aString</em></p> + </div> + + <div class="desc"> + <h4>Description</h4> + + <p>Extracts the pixel data from the specified rectangle and + returns it as a string. If you need to get the pixel data in a + memory buffer (as input to another application, for example), + this method is much, much faster than <a href= + "#export_pixels">export_pixels</a> or <a href= + "#get_pixels">get_pixels</a>.</p> + + <p>The string returned by <code>export_pixels_to_str</code> is + suitable for use as an argument to + <code>import_pixels</code>.</p> + + <p><strong>Note:</strong> You can also use <a href= + "image3.html#to_blob">to_blob</a> to convert an image into a + string.</p> + + <h4>Arguments</h4> + + <dl> + <dt>x, y</dt> + + <dd>The offset of the rectangle from the upper-left corner of + the image.</dd> + + <dt>columns, rows</dt> + + <dd>The width and height of the rectangle.</dd> + + <dt>map</dt> + + <dd>A string that describes which pixel channel data is + desired and the order in which it should be stored. + <span class="imquote">It can be any combination or order of R + = red, G = green, B = blue, A = alpha, C = cyan, Y = yellow, + M = magenta, K = black, I = intensity (for grayscale), or P = + pad.</span></dd> + + <dt>type</dt> + + <dd>A <a href="constants.html#StorageType">StorageType</a> + value that specifies the C datatype to which the pixel data + will be converted. The default is <code>CharPixel</code>, + which means that the pixel values will be stored as C + <code>unsigned char</code>s.</dd> + </dl> + + <h4>Returns</h4>A string + + <h4>See also</h4> + + <p><a href="image1.html#dispatch">dispatch</a>, <a href= + "#export_pixels">export_pixels</a>, <a href= + "#import_pixels">import_pixels</a>, <a href= + "#get_pixels">get_pixels</a></p> + + <h4>Magick API</h4> + + <p>ExportImagePixels</p> + </div> + + <div class="sig"> <h3 id="flip">flip</h3> <p><span class="arg">image</span>.flip -&gt; <em>anImage</em></p> </div> @@ -486,17 +568,18 @@ "javascript:popup('frame.rb.html')"> <!-- This img tag displays the original image when the mouse is over --> <img style="padding:25px; display:none" id="frameless" onmouseout="this.style.display='none';framed.style.display='';" src="ex/images/Flower_Hat.jpg" alt="frame example" title= - "Click to see the example script" /><!-- + "Click to see the example script" /><!-- This img tag displays the framed image when the mouse is not over - --><img class="hide" - id="framed" onmouseover= + --><img id="framed" + onmouseover= "this.style.display='none';frameless.style.display='';" src= - "ex/frame.jpg" alt="frame example" /></a> <img src= - "ex/images/spin.gif" alt="" style="margin-bottom: 280px" title= + "ex/frame.jpg" alt="frame example" /></a> + <img src="ex/images/spin.gif" alt="" style= + "margin-bottom: 280px" title= "Mouse over the example to see the original image" /></p> <h4>See also</h4> <p><a href="image1.html#border">border</a></p> @@ -1037,37 +1120,13 @@ </dl> </dd> <dt>type</dt> - <dd> - Specifies the type and range of the pixel data when - <span class="arg">pixels</span> is a string. One of the - following constants: - - <dl> - <dt>CharPixel</dt> - - <dd>type <code>unsigned char</code>, range 0-255</dd> - - <dt>ShortPixel</dt> - - <dd>type <code>unsigned short</code>, range 0-65535</dd> - - <dt>LongPixel, IntegerPixel</dt> - - <dd>type <code>unsigned long</code>, range - 0-4294967295</dd> - - <dt>QuantumPixel</dt> - - <dd>the Quantum type used by &times;Magick (depends on - how &times;Magick is configured) range 0-MaxRGB</dd> - </dl>The default is <code>Magick::CharPixel</code>. This - argument is ignored when <span class="arg">pixels</span> is - an array. - </dd> + <dd>A <a href="constants.html#StorageType">StorageType</a> + value that specifies the type and range of the pixel data + when <span class="arg">pixels</span> is a string.</dd> </dl> <h4>Returns</h4> <p>The image as transformed by the pixel data.</p> @@ -2113,21 +2172,30 @@ </div> <div class="sig"> <h3 id="ordered_dither">ordered_dither</h3> - <p><span class="arg">image</span>.ordered_dither -&gt; - <em>anImage</em></p> + <p><span class="arg">image</span>.ordered_dither(<span class= + "arg">order</span>=2) -&gt; <em>anImage</em></p> </div> <div class="desc"> <h4>Description</h4> <p class="imquote">Uses the ordered dithering technique of reducing color images to monochrome using positional information to retain as much information as possible.</p> + <h4>Arguments</h4> + + <dl> + <dt>order</dt> + + <dd>The dither order. Must be one of the integers 2, 3, or + 4.</dd> + </dl> + <h4>Returns</h4> <p>A new image</p> <h4>Example</h4> @@ -2146,10 +2214,10 @@ <p><a href="#posterize">posterize</a>, <a href= "image3.html#quantize">quantize</a></p> <h4>Magick API</h4> - <p>OrderedDitherImage</p> + <p>RandomThresholdImageChannel</p> </div> <div class="sig"> <h3 id="palette_q">palette?</h3>