doc/image2.html in rmagick-1.13.0 vs doc/image2.html in rmagick-1.14.0
- old
+ new
@@ -13,19 +13,39 @@
<meta name="Copyright" content=
"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" src="scripts/stripeTables.js">
+</script>
<script type="text/javascript">
//<![CDATA[
+ addLoadEvent(stripeTables);
+ //]]>
+</script>
+<script type="text/javascript">
+ //<![CDATA[
<!-- Pre-load this image so that the browser knows how big it is. -->
<!-- Begin
flower_hat = new Image();
flower_hat.src = "ex/images/Flower_Hat.jpg";
// End -->
//]]>
</script>
+<style type="text/css">
+ /*<![CDATA[*/
+#iptc {
+ border: thin solid black;
+}
+#iptc th {
+ background-color: #c0c0c0;
+}
+td.ds {
+ text-align: right;
+}
+ /*]]>*/
+</style>
</head>
<body>
<h6 id="header">RMagick User's Guide and Reference</h6>
@@ -56,20 +76,25 @@
<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=
+ "#find_similar_region">find_similar_region</a></li>
+
<li><a href="#flip">flip</a></li>
<li><a href="#flip_bang">flip!</a></li>
<li><a href="#flop">flop</a></li>
<li><a href="#flop_bang">flop!</a></li>
<li><a href="#frame">frame</a></li>
+ <li><a href="#freeze">freeze</a></li>
+
<li><a href="#gamma_channel">gamma_channel</a></li>
<li><a href="#gamma_correct">gamma_correct</a></li>
<li><a href="#gaussian_blur">gaussian_blur</a></li>
@@ -85,10 +110,12 @@
</ul>
</div>
<div class="toccol">
<ul>
+ <li><a href="#get_iptc_dataset">get_iptc_dataset</a></li>
+
<li><a href="#get_pixels">get_pixels</a></li>
<li><a href="#gray_q">gray?</a></li>
<li><a href=
@@ -403,10 +430,56 @@
<p>ExportImagePixels</p>
</div>
<div class="sig">
+ <h3 id="find_similar_region">find_similar_region</h3>
+
+ <p><span class=
+ "arg">image</span>.find_similar_region(<span class=
+ "arg">target</span>, <span class="arg">x</span>=0, <span class=
+ "arg">y</span>=0) -> <em>[rx, ry]</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>This interesting method searches for a rectangle in the
+ image that is <em>similar</em> to the target. For the rectangle
+ to be <em>similar</em> each pixel in the rectangle must match
+ the corresponding pixel in the target image within the range
+ specified by the <code>fuzz</code> attributes of the image and
+ the target image.</p>
+
+ <h4>Arguments</h4>
+
+ <dl>
+ <dt>target</dt>
+
+ <dd>An image that forms the target of the search. This image
+ can be any size.</dd>
+
+ <dt>x, y</dt>
+
+ <dd>The starting <em>x-</em> and <em>y-</em>offsets for the
+ search. If omitted both <span class="arg">x</span> and
+ <span class="arg">y</span> default to 0.</dd>
+ </dl>
+
+ <h4>Returns</h4>
+
+ <p>If the search succeeds, the return value is an array with 2
+ elements. These elements are the <em>x-</em> and
+ <em>y-</em>offsets of the matching rectangle. If the search
+ fails the return value is <code>nil</code>.</p>
+
+ <h4>Magick API</h4>
+
+ <p>IsImageSimilar (available in ImageMagick 6.2.8)</p>
+ </div>
+
+ <div class="sig">
<h3 id="flip">flip</h3>
<p><span class="arg">image</span>.flip ->
<em>anImage</em></p>
</div>
@@ -591,10 +664,27 @@
<p>FrameImage</p>
</div>
<div class="sig">
+ <h3 id="freeze">freeze</h3>
+
+ <p><span class="arg">image</span>.freeze ->
+ <em>self</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>Prevent further modifications to the image.</p>
+
+ <h4>Returns</h4>
+
+ <p>self</p>
+ </div>
+
+ <div class="sig">
<h3 id="gamma_channel">gamma_channel</h3>
<p><span class="arg">image</span>.gamma_channel(<span class=
"arg">gamma</span>, [<span class="arg">channel</span>...]) =
<em>anImage</em></p>
@@ -642,12 +732,12 @@
<div class="sig">
<h3 id="gamma_correct">gamma_correct</h3>
<p><span class="arg">image</span>.gamma_correct(<span class=
"arg">red_gamma</span>[,<span class="arg">green_gamma</span>[,
- <span class="arg">blue_gamma</span>[, <span class=
- "arg">opacity_gamma</span>]]]) -> <em>anImage</em></p>
+ <span class="arg">blue_gamma</span>]]) ->
+ <em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
@@ -867,10 +957,549 @@
<p><a href="#get_exif_by_entry">get_exif_by_entry</a></p>
</div>
<div class="sig">
+ <h3 id="get_iptc_dataset">get_iptc_dataset</h3>
+
+ <p><span class="arg">image</span>.get_iptc_dataset(<span class=
+ "arg">ds</span>) -> <em>aString</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>Retrieves the data field for the specified DataSet, or
+ <code>nil</code> if the DataSet is not used or the data field
+ has length 0.</p>
+
+ <h4>Arguments</h4>
+
+ <p>RMagick defines the following constants for use as arguments
+ to this method. All the constants are in the Magick::IPTC
+ namespace. Notice that some DataSets have two names.</p>
+
+ <table id="iptc" class="striped" summary=
+ "IPTC dataset constants">
+ <tr>
+ <th>Constant</th>
+
+ <th>Record:DataSet</th>
+ </tr>
+
+ <tr>
+ <td>
+ Envelope::Model_Version</td>
+
+ <td class="ds">1:00</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Destination</td>
+
+ <td class="ds">1:05</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::UNO</td>
+
+ <td class="ds">1:100</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Unique_Name_of_Object</td>
+
+ <td class="ds">1:100</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::ARM_Identifier</td>
+
+ <td class="ds">1:120</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::ARM_Version</td>
+
+ <td class="ds">1:122</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::File_Format</td>
+
+ <td class="ds">1:20</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::File_Format_Version</td>
+
+ <td class="ds">1:22</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Service_Identifier</td>
+
+ <td class="ds">1:30</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Envelope_Number</td>
+
+ <td class="ds">1:40</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Product_ID</td>
+
+ <td class="ds">1:50</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Envelope_Priority</td>
+
+ <td class="ds">1:60</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Date_Sent</td>
+
+ <td class="ds">1:70</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Time_Sent</td>
+
+ <td class="ds">1:80</td>
+ </tr>
+ <tr>
+ <td>
+ Envelope::Coded_Character_Set</td>
+
+ <td class="ds">1:90</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Object_Type_Reference</td>
+
+ <td class="ds">2:03</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Object_Name</td>
+
+ <td class="ds">2:05</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Title</td>
+
+ <td class="ds">2:05</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Edit_Status</td>
+
+ <td class="ds">2:07</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Editorial_Update</td>
+
+ <td class="ds">2:08</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Urgency</td>
+
+ <td class="ds">2:10</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Country_Primary_Location_Code</td>
+
+ <td class="ds">2:100</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Country_Primary_Location_Name</td>
+
+ <td class="ds">2:101</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Original_Transmission_Reference</td>
+
+ <td class="ds">2:103</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Headline</td>
+
+ <td class="ds">2:105</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Credit</td>
+
+ <td class="ds">2:110</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Source</td>
+
+ <td class="ds">2:115</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Copyright_Notice</td>
+
+ <td class="ds">2:116</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Contact</td>
+
+ <td class="ds">2:118</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Subject_Reference</td>
+
+ <td class="ds">2:12</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Abstract</td>
+
+ <td class="ds">2:120</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Caption</td>
+
+ <td class="ds">2:120</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Caption_Writer</td>
+
+ <td class="ds">2:122</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Editor</td>
+
+ <td class="ds">2:122</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Rasterized_Caption</td>
+
+ <td class="ds">2:125</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Image_Type</td>
+
+ <td class="ds">2:130</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Image_Orientation</td>
+
+ <td class="ds">2:131</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Language_Identifier</td>
+
+ <td class="ds">2:135</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Category</td>
+
+ <td class="ds">2:15</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Audio_Type</td>
+
+ <td class="ds">2:150</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Audio_Sampling_Rate</td>
+
+ <td class="ds">2:151</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Audio_Sampling_Resolution</td>
+
+ <td class="ds">2:152</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Audio_Duration</td>
+
+ <td class="ds">2:153</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Audio_Outcue</td>
+
+ <td class="ds">2:154</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Supplemental_Category</td>
+
+ <td class="ds">2:20</td>
+ </tr>
+ <tr>
+ <td>
+ Application::ObjectData_Preview_File_Format</td>
+
+ <td class="ds">2:200</td>
+ </tr>
+ <tr>
+ <td>
+ Application::ObjectData_Preview_File_Format_Version</td>
+
+ <td class="ds">2:201</td>
+ </tr>
+ <tr>
+ <td>
+ Application::ObjectData_Preview_Data</td>
+
+ <td class="ds">2:202</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Fixture_Identifier</td>
+
+ <td class="ds">2:22</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Keywords</td>
+
+ <td class="ds">2:25</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Content_Location_Code</td>
+
+ <td class="ds">2:26</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Content_Location_Name</td>
+
+ <td class="ds">2:27</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Release_Date</td>
+
+ <td class="ds">2:30</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Release_Time</td>
+
+ <td class="ds">2:35</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Expiration_Time</td>
+
+ <td class="ds">2:35</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Expiration_Date</td>
+
+ <td class="ds">2:37</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Special_Instructions</td>
+
+ <td class="ds">2:40</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Action_Advised</td>
+
+ <td class="ds">2:42</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Reference_Service</td>
+
+ <td class="ds">2:45</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Reference_Date</td>
+
+ <td class="ds">2:47</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Reference_Number</td>
+
+ <td class="ds">2:50</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Date_Created</td>
+
+ <td class="ds">2:55</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Time_Created</td>
+
+ <td class="ds">2:60</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Digital_Creation_Date</td>
+
+ <td class="ds">2:62</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Digital_Creation_Time</td>
+
+ <td class="ds">2:63</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Originating_Program</td>
+
+ <td class="ds">2:65</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Program_Version</td>
+
+ <td class="ds">2:70</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Object_Cycle</td>
+
+ <td class="ds">2:75</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Author</td>
+
+ <td class="ds">2:80</td>
+ </tr>
+ <tr>
+ <td>
+ Application::By_Line</td>
+
+ <td class="ds">2:80</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Author_Position</td>
+
+ <td class="ds">2:85</td>
+ </tr>
+ <tr>
+ <td>
+ Application::By_Line_Title</td>
+
+ <td class="ds">2:85</td>
+ </tr>
+ <tr>
+ <td>
+ Application::City</td>
+
+ <td class="ds">2:90</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Sub_Location</td>
+
+ <td class="ds">2:92</td>
+ </tr>
+ <tr>
+ <td>
+ Application::Province</td>
+
+ <td class="ds">2:95</td>
+ </tr>
+ <tr>
+ <td>
+ Application::State</td>
+
+ <td class="ds">2:95</td>
+ </tr>
+ <tr>
+ <td>
+ Pre_ObjectData_Descriptor::Size_Mode</td>
+
+ <td class="ds">7:10</td>
+ </tr>
+ <tr>
+ <td>
+ Pre_ObjectData_Descriptor::Max_Subfile_Size</td>
+
+ <td class="ds">7:20</td>
+ </tr>
+ <tr>
+ <td>
+ Pre_ObjectData_Descriptor::ObjectData_Size_Announced</td>
+
+ <td class="ds">7:90</td>
+ </tr>
+ <tr>
+ <td>
+ Pre_ObjectData_Descriptor::Maximum_ObjectData_Size</td>
+
+ <td class="ds">7:95</td>
+ </tr>
+ <tr>
+ <td>
+ ObjectData::Subfile</td>
+
+ <td class="ds">8:10</td>
+ </tr>
+ <tr>
+ <td>
+ Post_ObjectData_Descriptor::Confirmed_ObjectData_Size</td>
+
+ <td class="ds">9:10</td>
+ </tr>
+
+ </table>
+
+ <h4>Example</h4>
+ <pre>
+img.get_iptc_dataset(Magick::IPTC::Application::Keywords)
+</pre>
+
+ <h4>Returns</h4>
+
+ <p>The data field or nil</p>
+
+ <h4>See also</h4>
+
+ <p><a href=
+ "image1.html#each_iptc_dataset">each_iptc_dataset</a>, <a href=
+ "imageattrs.html#iptc_profile">iptc_profile</a></p>
+ </div>
+
+ <div class="sig">
<h3 id="get_pixels">get_pixels</h3>
<p><span class="arg">image</span>.get_pixels(<span class=
"arg">x</span>, <span class="arg">y</span>, <span class=
"arg">columns</span>, <span class="arg">rows</span>) ->
@@ -1371,21 +2000,10 @@
<h4>Returns</h4>
<p>A new image</p>
- <h4>Example</h4>
-
- <p class="rollover"><a href=
- "javascript:popup('level_channel.rb.html')"><img onmouseover=
- "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
- "this.src='ex/level_channel.jpg'" src="ex/level_channel.jpg"
- title="Click to see the example script" alt=
- "level_channel example" /></a> <img src="ex/images/spin.gif"
- alt="" class="spin" title=
- "Mouse over the example to see the original image" /></p>
-
<h4>See also</h4>
<p><a href="#level">level</a></p>
<h4>Magick API</h4>
@@ -1851,12 +2469,12 @@
<div class="sig">
<h3 id="motion_blur">motion_blur</h3>
<p><span class="arg">image</span>.motion_blur(<span class=
- "arg">radius</span>, <span class="arg">sigma</span>,
- <span class="arg">angle</span>) -> <em>anImage</em></p>
+ "arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0,
+ <span class="arg">angle</span>=0.0) -> <em>anImage</em></p>
</div>
<div class="desc">
<h4>Description</h4>
@@ -2148,22 +2766,13 @@
<h4>Returns</h4>
<p>A new image</p>
<h4>Example</h4>
-
- <p>This example replaces white pixels with red pixels. Set the
- fuzz attribute to specify how closely the target pixels must
- match.</p>
-
- <p class="rollover"><a href=
- "javascript:popup('opaque.rb.html')"><img src="ex/opaque.jpg"
- alt="opaque example" onmouseover=
- "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
- "this.src='ex/opaque.jpg'" title=
- "Click to see the example script" /></a> <img src=
- "ex/images/spin.gif" alt="" class="spin" title=
- "Mouse over the example to see the original image" /></p>
+ <pre>
+img.fuzz = 25
+img = img.opaque('white', 'red')
+</pre>
<h4>See also</h4>
<p><a href="#color_floodfill">color_floodfill</a></p>