rmagick 1.10.1 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
 
2
2
  # RMagick configure.ac
3
3
 
4
- AC_INIT(RMagick, 1.10.1, rmagick@rubyforge.org, RMagick-1.10.1.tar.gz)
4
+ AC_INIT(RMagick, 1.11.0, rmagick@rubyforge.org, RMagick-1.11.0.tar.gz)
5
5
  echo "Configuring ${PACKAGE_STRING}"
6
6
 
7
7
  AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
@@ -19,7 +19,7 @@ fi
19
19
 
20
20
  # See if user prefers GraphicsMagick over ImageMagick
21
21
  AC_ARG_WITH(graphics-magick,
22
- AC_HELP_STRING([--with-graphics-magick], [configure RMagick with GraphicsMagick]),
22
+ AS_HELP_STRING([--with-graphics-magick], [configure RMagick with GraphicsMagick]),
23
23
  [with_graphics_magick=$withval],
24
24
  [with_graphics_magick='no'])
25
25
 
@@ -99,9 +99,9 @@ if test "$rm_have_acquirestringinfo" = yes; then
99
99
  fi
100
100
 
101
101
  AC_CHECK_FUNCS([AdaptiveThresholdImage AddDefinitions AddNoiseImageChannel BilevelImageChannel])
102
- AC_CHECK_FUNCS([BlackThresholdImage BlurImageChannel CompareImageChannels ConvolveImageChannel])
103
- AC_CHECK_FUNCS([EvaluateImageChannel ExportImagePixels FuzzyColorCompare])
104
- AC_CHECK_FUNCS([GammaImageChannel GaussianBlurImageChannel])
102
+ AC_CHECK_FUNCS([BlackThresholdImage BlurImageChannel ClearMagickException CompareImageChannels])
103
+ AC_CHECK_FUNCS([CompareImageLayers ContrastStretchImageChannel ConvolveImageChannel EvaluateImageChannel])
104
+ AC_CHECK_FUNCS([ExportImagePixels FuzzyColorCompare GammaImageChannel GaussianBlurImageChannel])
105
105
  AC_CHECK_FUNCS([GetColorHistogram GetColorInfoArray])
106
106
 
107
107
  # We need to be able to query these symbols later in the configure script, so set a shell
@@ -144,12 +144,12 @@ if test "$rm_have_gettypeinfolist" = yes; then
144
144
  AC_DEFINE(HAVE_GETTYPEINFOLIST)
145
145
  fi
146
146
 
147
- AC_CHECK_FUNCS([GrayscalePseudoClassImage ImagesToBlob ImportImagePixels InterpretImageAttributes])
148
- AC_CHECK_FUNCS([IsColorSimilar NegateImageChannel NormalizeImageChannel])
149
- AC_CHECK_FUNCS([ParseSizeGeometry PosterizeImage PreviewImage QuantumOperatorRegionImage])
150
- AC_CHECK_FUNCS([RadialBlurImage RandomChannelThresholdImage RandomThresholdImageChannel])
151
- AC_CHECK_FUNCS([SeparateImageChannel SepiaToneImage SetImageBackgroundColor])
152
- AC_CHECK_FUNCS([SetImageChannelDepth SetImageColorspace SetImageOption])
147
+ AC_CHECK_FUNCS([GetMagickResourceLimit GrayscalePseudoClassImage ImagesToBlob ImportImagePixels])
148
+ AC_CHECK_FUNCS([InheritException InterpretImageAttributes IsColorSimilar NegateImageChannel])
149
+ AC_CHECK_FUNCS([NormalizeImageChannel ParseSizeGeometry PosterizeImage PreviewImage])
150
+ AC_CHECK_FUNCS([QuantumOperatorRegionImage RadialBlurImage RandomChannelThresholdImage])
151
+ AC_CHECK_FUNCS([RandomThresholdImageChannel SeparateImageChannel SepiaToneImage])
152
+ AC_CHECK_FUNCS([SetImageBackgroundColor SetImageChannelDepth SetImageColorspace SetImageOption])
153
153
  AC_CHECK_FUNCS([SetImageProgressMonitor ShadowImage SharpenImageChannel])
154
154
  AC_CHECK_FUNCS([SigmoidalContrastImageChannel SpliceImage StripImage])
155
155
  AC_CHECK_FUNCS([ThresholdImageChannel TintImage])
@@ -235,34 +235,34 @@ if test "$rm_cv_member_Image_extract_info" = yes; then
235
235
  AC_DEFINE(HAVE_IMAGE_EXTRACT_INFO)
236
236
  fi
237
237
 
238
- AC_CACHE_CHECK(for HSBColorspace enum value, rm_cv_enum_hsbcolorspace,
238
+ AC_CACHE_CHECK(for CineonLogRGBColorspace enum value, rm_cv_enum_cineonlogrgbcolorspace,
239
239
  [AC_TRY_COMPILE(
240
240
  [#include <stdio.h>
241
241
  #if HAVE_SYS_TYPES_H
242
242
  #include <sys/types.h>
243
243
  #endif
244
244
  #include "magick/api.h"],
245
- [ColorspaceType x; x = HSBColorspace],
246
- rm_cv_enum_hsbcolorspace='yes',
247
- rm_cv_enum_hsbcolorspace='no')])
245
+ [ColorspaceType x; x = CineonLogRGBColorspace],
246
+ rm_cv_enum_cineonlogrgbcolorspace='yes',
247
+ rm_cv_enum_cineonlogrgbcolorspace='no')])
248
248
 
249
- if test "$rm_cv_enum_hsbcolorspace" = yes; then
250
- AC_DEFINE(HAVE_HSBCOLORSPACE)
249
+ if test "$rm_cv_enum_cineonlogrgbcolorspace" = yes; then
250
+ AC_DEFINE(HAVE_CINEONLOGRGBCOLORSPACE)
251
251
  fi
252
252
 
253
- AC_CACHE_CHECK(for CineonLogRGBColorspace enum value, rm_cv_enum_cineonlogrgbcolorspace,
253
+ AC_CACHE_CHECK(for HSBColorspace enum value, rm_cv_enum_hsbcolorspace,
254
254
  [AC_TRY_COMPILE(
255
255
  [#include <stdio.h>
256
256
  #if HAVE_SYS_TYPES_H
257
257
  #include <sys/types.h>
258
258
  #endif
259
259
  #include "magick/api.h"],
260
- [ColorspaceType x; x = CineonLogRGBColorspace],
261
- rm_cv_enum_cineonlogrgbcolorspace='yes',
262
- rm_cv_enum_cineonlogrgbcolorspace='no')])
260
+ [ColorspaceType x; x = HSBColorspace],
261
+ rm_cv_enum_hsbcolorspace='yes',
262
+ rm_cv_enum_hsbcolorspace='no')])
263
263
 
264
- if test "$rm_cv_enum_cineonlogrgbcolorspace" = yes; then
265
- AC_DEFINE(HAVE_CINEONLOGRGBCOLORSPACE)
264
+ if test "$rm_cv_enum_hsbcolorspace" = yes; then
265
+ AC_DEFINE(HAVE_HSBCOLORSPACE)
266
266
  fi
267
267
 
268
268
  AC_CACHE_CHECK(for LABColorspace enum value, rm_cv_enum_labcolorspace,
@@ -355,7 +355,6 @@ if test "$rm_cv_enum_logcolorspace" = yes; then
355
355
  AC_DEFINE(HAVE_LOGCOLORSPACE)
356
356
  fi
357
357
 
358
-
359
358
  AC_CACHE_CHECK(for CopyCyanCompositeOp enum value, rm_cv_enum_copycyancompositeop,
360
359
  [AC_TRY_COMPILE(
361
360
  [#include <stdio.h>
@@ -521,6 +520,20 @@ if test "$rm_cv_enum_transparentvirtualpixelmethod" = yes; then
521
520
  AC_DEFINE(HAVE_TRANSPARENTVIRTUALPIXELMETHOD)
522
521
  fi
523
522
 
523
+ AC_CACHE_CHECK(for CoalesceLayer enum value, rm_cv_enum_coalescelayer,
524
+ [AC_TRY_COMPILE(
525
+ [#include <stdio.h>
526
+ #if HAVE_SYS_TYPES_H
527
+ #include <sys/types.h>
528
+ #endif
529
+ #include "magick/api.h"],
530
+ [MagickLayerMethod x; x = CoalesceLayer],
531
+ rm_cv_enum_coalescelayer='yes',
532
+ rm_cv_enum_coalescelayer='no')])
533
+
534
+ if test "$rm_cv_enum_coalescelayer" = yes; then
535
+ AC_DEFINE(HAVE_COALESCELAYER)
536
+ fi
524
537
 
525
538
  if test "$rm_have_getimagequantumdepth" = yes; then
526
539
  # IM 6.0.5 changed the number of arguments to GetImageQuantumDepth.
@@ -632,59 +645,65 @@ if test `eval echo $datadir` != ${prefix}/share; then
632
645
  RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --data-dir=`eval echo $datadir`"
633
646
  fi
634
647
 
648
+ AC_ARG_WITH(ruby-prog,
649
+ AS_HELP_STRING([--with-ruby-prog=NAME], [the ruby program used for installation [[PREFIX/bin/ruby]]]),
650
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-prog=$withval"
651
+ RUBY=$withval], )
652
+
653
+ AC_ARG_WITH(rbconfig,
654
+ AS_HELP_STRING([--with-rbconfig=PATH], [your rbconfig to load [[ruby's]]]),
655
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rbconfig=$withval"], )
656
+
635
657
  AC_ARG_WITH(doc-dir,
636
- AC_HELP_STRING([--with-doc-dir=DIR], [RMagick documentation directory [[PREFIX/share/RMagick]]]),
658
+ AS_HELP_STRING([--with-doc-dir=DIR], [RMagick documentation directory [[PREFIX/share/RMagick]]]),
637
659
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --doc-dir=$withval"], )
638
660
 
639
661
  AC_ARG_WITH(std-ruby,
640
- AC_HELP_STRING([--with-std-ruby=DIR], [the directory for standard ruby libraries [[PREFIX/lib/ruby/1.x]]]),
662
+ AS_HELP_STRING([--with-std-ruby=DIR], [the directory for standard ruby libraries [[PREFIX/lib/ruby/1.x]]]),
641
663
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --std-ruby=$withval"], )
642
664
 
643
665
  AC_ARG_WITH(site-ruby,
644
- AC_HELP_STRING([--with-site-ruby=DIR], [the directory for non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby/1.x]]]),
666
+ AS_HELP_STRING([--with-site-ruby=DIR], [the directory for non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby/1.x]]]),
645
667
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby=$withval"], )
646
668
 
647
669
  AC_ARG_WITH(site-ruby-common,
648
- AC_HELP_STRING([--with-site-ruby-common=DIR], [the directory for version-independent non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby]]]),
670
+ AS_HELP_STRING([--with-site-ruby-common=DIR], [the directory for version-independent non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby]]]),
649
671
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby-common=$withval"], )
650
672
 
651
673
  AC_ARG_WITH(rb-dir,
652
- AC_HELP_STRING([--with-rb-dir=DIR], [the directory for ruby scripts [[PREFIX/lib/ruby/site_ruby/1.x]]]),
674
+ AS_HELP_STRING([--with-rb-dir=DIR], [the directory for ruby scripts [[PREFIX/lib/ruby/site_ruby/1.x]]]),
653
675
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rb-dir=$withval"], )
654
676
 
655
677
  AC_ARG_WITH(so-dir,
656
- AC_HELP_STRING([--with-so-dir=DIR], [the directory for ruby extensions]),
678
+ AS_HELP_STRING([--with-so-dir=DIR], [the directory for ruby extensions]),
657
679
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --so-dir=$withval"], )
658
680
 
659
681
  AC_ARG_WITH(ruby-path,
660
- AC_HELP_STRING([--with-ruby-path=DIR], [path to set to #! line [PREFIX/bin/ruby]]),
682
+ AS_HELP_STRING([--with-ruby-path=DIR], [path to set to #! line [PREFIX/bin/ruby]]),
661
683
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-path=$withval"], )
662
684
 
663
- AC_ARG_WITH(ruby-prog,
664
- AC_HELP_STRING([--with-ruby-prog=NAME], [the ruby program used for installation [[PREFIX/bin/ruby]]]),
665
- [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-prog=$withval"
666
- RUBY=$withval], )
667
-
668
685
  AC_ARG_WITH(make-prog,
669
- AC_HELP_STRING([--with-make-prog=NAME], [the make program to compile ruby extensions [[make]]]),
686
+ AS_HELP_STRING([--with-make-prog=NAME], [the make program to compile ruby extensions [[make]]]),
670
687
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --make-prog=$withval"], )
671
688
 
672
- AC_ARG_WITH(rbconfig,
673
- AC_HELP_STRING([--with-rbconfig=PATH], [your rbconfig to load [[ruby's]]]),
674
- [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rbconfig=$withval"], )
675
-
676
689
  AC_ARG_ENABLE(without-ext,
677
- AC_HELP_STRING([--enable-without-ext], [does not compile/install ruby extensions [[--disable-without-ext]]]),
690
+ AS_HELP_STRING([--enable-without-ext], [does not compile/install ruby extensions [[--disable-without-ext]]]),
678
691
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --without-ext"], )
679
692
 
680
693
  AC_ARG_ENABLE(no-harm,
681
- AC_HELP_STRING([--enable-no-harm], [only display what to do if given [[--disable-no-harm]]]),
694
+ AS_HELP_STRING([--enable-no-harm], [only display what to do if given [[--disable-no-harm]]]),
682
695
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --no-harm"], )
683
696
 
684
697
  AC_ARG_ENABLE(allow-example-errors,
685
- AC_HELP_STRING([--enable-allow-example-errors], [allow installation to proceed even if a lot of examples fail [--disable-allow-example-errors]]),
698
+ AS_HELP_STRING([--enable-allow-example-errors], [allow installation to proceed even if a lot of examples fail [[--disable-allow-example-errors]]]),
686
699
  [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --allow-example-errors"], )
687
700
 
701
+ AC_ARG_ENABLE(htmldoc,
702
+ AS_HELP_STRING([--disable-htmldoc], [skip creating the HTML documentation and examples [[--enable-htmldoc]]]),
703
+ [if test "$enable_htmldoc" = no; then
704
+ RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --disable-htmldoc"
705
+ fi], )
706
+
688
707
 
689
708
  RUBY_VERSION_STRING=`$RUBY --version`
690
709
  AC_DEFINE_UNQUOTED(RUBY_VERSION_STRING, "$RUBY_VERSION_STRING")
@@ -5,8 +5,7 @@ require 'RMagick'
5
5
 
6
6
  before = Magick::Image.read('images/Flower_Hat.jpg').first
7
7
 
8
- # Allow the white-point argument to default.
9
8
  # Brighten up the mid-tones a bit.
10
- after = before.level(0,1.50)
9
+ after = before.level(0, Magick::MaxRGB, 1.50)
11
10
  after.write('level.jpg')
12
11
  exit
@@ -50,7 +50,7 @@ gc.text 330,125, "'320,120'"
50
50
  # Add control point labels
51
51
  gc.text 30, 25, "'20,20'"
52
52
  gc.text 180, 25, "'170,20'"
53
- gc.text 330,225, "'320,320'"
53
+ gc.text 330,225, "'320,220'"
54
54
 
55
55
  # Add auto control point label
56
56
  gc.text 180,225, "'auto ctl point'"
@@ -4,7 +4,7 @@
4
4
  <html xmlns="http://www.w3.org/1999/xhtml">
5
5
  <head>
6
6
  <meta name="generator" content=
7
- "HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
7
+ "HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" />
8
8
 
9
9
  <title>RMagick: class ImageList</title>
10
10
  <meta http-equiv="Content-Type" content=
@@ -15,23 +15,8 @@
15
15
  <link rel="stylesheet" type="text/css" href="css/doc.css" />
16
16
  <script type="text/javascript" src="scripts/doc.js">
17
17
  </script>
18
- <script type="text/javascript">
19
- //<![CDATA[
20
- <!-- Pre-load these images -->
21
- img = new Image();
22
- img.src = "ex/average_before.gif";
23
- img.src = "ex/coalesce_anim.gif";
24
- img.src = "ex/map_before.jpg";
25
- img.src = "ex/morph.gif";
26
- img.src = "ex/quantize-m_before.jpg";
27
- //]]>
18
+ <script type="text/javascript" src="scripts/doc.js">
28
19
  </script>
29
- <style type="text/css">
30
- /*<![CDATA[*/
31
-
32
- /* Styles local to this page. */
33
- /*]]>*/
34
- </style>
35
20
  </head>
36
21
 
37
22
  <body>
@@ -111,17 +96,19 @@
111
96
  <li><a href="#map">map</a></li>
112
97
 
113
98
  <li><a href="#montage">montage</a></li>
99
+
100
+ <li><a href="#morph">morph</a></li>
114
101
  </ul>
115
102
  </div>
116
103
 
117
104
  <div class="toccol">
118
105
  <ul>
119
- <li><a href="#morph">morph</a></li>
120
-
121
106
  <li><a href="#mosaic">mosaic</a></li>
122
107
 
123
108
  <li><a href="#new_image">new_image</a></li>
124
109
 
110
+ <li><a href="#optimize_layers">optimize_layers</a></li>
111
+
125
112
  <li><a href="#ping">ping</a></li>
126
113
 
127
114
  <li><a href="#quantize">quantize</a></li>
@@ -189,8 +176,8 @@ i = Magick::ImageList.new("Button_A.gif", "Cheetah.jpg")
189
176
  time between each image in an animation. The
190
177
  <code>delay=</code> attribute assigns the same delay to all the
191
178
  images in the imagelist. Use <a href=
192
- "imageattrs.html#Image.delay">Image#delay=</a> to set different
193
- delay values on individual images.</p>
179
+ "imageattrs.html#delay">Image#delay=</a> to set different delay
180
+ values on individual images.</p>
194
181
 
195
182
  <h4>Arguments</h4>
196
183
 
@@ -208,7 +195,7 @@ imagelist.delay = 20 # delay 1/5 of a second between images.
208
195
 
209
196
  <h4>See also</h4>
210
197
 
211
- <p><a href="imageattrs.html#Image.delay">Image#delay=</a></p>
198
+ <p><a href="imageattrs.html#delay">Image#delay=</a></p>
212
199
  </div>
213
200
 
214
201
  <div class="sig">
@@ -546,15 +533,16 @@ imagelist.animate { self.server_name = "other:0.0" }
546
533
  <img style="display:none" id="notaveraged" onmouseout=
547
534
  "this.style.display='none'; averaged.style.display=''; averagedspin.style.display='';"
548
535
  title="Click to see the example script" src=
549
- "ex/average_before.gif" alt="average example" /><!--
536
+ "ex/average_before.gif" alt="average example" /><!--
550
537
  This img tag displays the averaged image when the mouse is not over
551
538
  --><img style="display:" id=
552
539
  "averaged" onmouseover=
553
540
  "this.style.display='none'; notaveraged.style.display=''; averagedspin.style.display='none';"
554
- src="ex/average_after.gif" alt="average example" /></a>
555
- <img src="ex/images/spin.gif" alt="" class="spin" style=
556
- "left:131px; display:" id="averagedspin" title=
557
- "Mouse over the example to see the 3 original images" /></p>
541
+ src="ex/average_after.gif" alt="average example"
542
+ /></a> <img src="ex/images/spin.gif" alt="" class=
543
+ "spin" style="left:131px; display:" id="averagedspin" title=
544
+ "Mouse over the example to see the 3 original images"
545
+ /></p>
558
546
 
559
547
  <h4>Magick API</h4>
560
548
 
@@ -598,11 +586,11 @@ imagelist.animate { self.server_name = "other:0.0" }
598
586
  previous images.</p>
599
587
 
600
588
  <p>The length of time between images in the new image is
601
- specified by the <a href=
602
- "imageattrs.html#Image.delay">delay</a> attribute of the input
603
- image. The position of the image on the merged images is
604
- specified by the <a href="imageattrs.html#Image.page">page</a>
605
- attribute of the input image.</p>
589
+ specified by the <a href="imageattrs.html#delay">delay</a>
590
+ attribute of the input image. The position of the image on the
591
+ merged images is specified by the <a href=
592
+ "imageattrs.html#page">page</a> attribute of the input
593
+ image.</p>
606
594
 
607
595
  <h4>Returns</h4>
608
596
 
@@ -713,6 +701,10 @@ imagelist2 = imagelist1.copy
713
701
  <h4>Magick API</h4>
714
702
 
715
703
  <p>DeconstructImages</p>
704
+
705
+ <h4>See also</h4>
706
+
707
+ <p><a href="#optimize_layers">optimize_layers</a></p>
716
708
  </div>
717
709
 
718
710
  <div class="sig">
@@ -760,6 +752,11 @@ imagelist2 = imagelist1.copy
760
752
  <p><a href="#animate">animate</a>, <a href=
761
753
  "image1.html#display">Image#display</a></p>
762
754
 
755
+ <h4>Note</h4>
756
+
757
+ <p>The display method is not supported on native MS
758
+ Windows.</p>
759
+
763
760
  <h4>Magick API</h4>
764
761
 
765
762
  <p>DisplayImages</p>
@@ -894,13 +891,12 @@ scene=1
894
891
  <h4>See also</h4>
895
892
 
896
893
  <p><a href="image2.html#inspect">Image#inspect</a></p>
897
-
898
894
  </div>
899
895
 
900
896
  <div class="sig">
901
897
  <h3 id="map">map</h3>
902
898
 
903
- <p><span class="arg">imagelist.map</span>(<span class=
899
+ <p><span class="arg">imagelist</span>.map(<span class=
904
900
  "arg">reference</span>, <span class="arg">dither</span>) -&gt;
905
901
  <em>anImageList</em></p>
906
902
  </div>
@@ -1007,7 +1003,7 @@ scene=1
1007
1003
 
1008
1004
  <dd><em>Hint:</em> You can use a different composite operator
1009
1005
  for each tile by setting each image's <a href=
1010
- "imageattrs.html#Image.compose">compose=</a> attribute to the
1006
+ "imageattrs.html#compose">compose=</a> attribute to the
1011
1007
  desired operator. In the optional arguments block, set
1012
1008
  <code>compose</code> to UndefinedCompositeOp.</dd>
1013
1009
 
@@ -1160,6 +1156,9 @@ img[2]['Label'] = "Mom's Birthday"
1160
1156
  <h4>Example</h4><a href=
1161
1157
  "javascript:popup('demo.rb.html')">demo.rb</a>
1162
1158
 
1159
+ <h4>Example</h4><a href=
1160
+ "javascript:popup('demo.rb.html')">demo.rb</a>
1161
+
1163
1162
  <h4>Magick API</h4>
1164
1163
 
1165
1164
  <p>MontageImages</p>
@@ -1223,7 +1222,7 @@ img[2]['Label'] = "Mom's Birthday"
1223
1222
 
1224
1223
  <p>Composites all the images into a single new image. The
1225
1224
  location of each image is determined by the value of its
1226
- <a href="imageattrs.html#Image.page">page</a> attribute.</p>
1225
+ <a href="imageattrs.html#page">page</a> attribute.</p>
1227
1226
 
1228
1227
  <h4>Returns</h4>
1229
1228
 
@@ -1248,9 +1247,9 @@ img[2]['Label'] = "Mom's Birthday"
1248
1247
  <h3 id="new_image">new_image</h3>
1249
1248
 
1250
1249
  <p><span class="arg">imagelist.</span>new_image(<span class=
1251
- "arg">columns</span>, <span class="arg">rows</span><span class=
1252
- "arg">[, fill]</span>) <span class="arg">[&nbsp;{ optional
1253
- arguments }&nbsp;]</span> -&gt; <em>self</em></p>
1250
+ "arg">columns</span>, <span class="arg">rows[, fill]</span>)
1251
+ <span class="arg">[&nbsp;{ optional arguments }&nbsp;]</span>
1252
+ -&gt; <em>self</em></p>
1254
1253
  </div>
1255
1254
 
1256
1255
  <div class="desc">
@@ -1288,6 +1287,112 @@ imagelist.new_image(100, 100) { self.background_color = "red" }
1288
1287
  </pre>
1289
1288
  </div>
1290
1289
 
1290
+ <div class="sig">
1291
+ <h3 id="optimize_layers">optimize_layers</h3>
1292
+
1293
+ <p><span class=
1294
+ "arg">imagelist</span>.optimize_layers(<span class=
1295
+ "arg">layer_method</span>) -&gt; <em>anImageList</em></p>
1296
+ </div>
1297
+
1298
+ <div class="desc">
1299
+ <h4>Description</h4>
1300
+
1301
+ <p>Optimizes or compares the images in the list. Equivalent to
1302
+ the <code>-layers</code> option in ImageMagick's
1303
+ <code>mogrify</code> command.</p>
1304
+
1305
+ <p>With the CompareAnyLayer, CompareClearLayer, and
1306
+ CompareOverlayLayer arguments, <code>optimize_layers</code>
1307
+ <span class="imquote">compares each image with the next in a
1308
+ sequence and returns the minimum bounding region of all the
1309
+ pixel differences (of the <code>LayerMethod</code> specified)
1310
+ it discovers.</span></p>
1311
+
1312
+ <p class="imquote">The images in the list <span class=
1313
+ "imquote">do NOT have to be the same size, though it is best
1314
+ that all the images are fully 'coalesced' (images are all the
1315
+ same size, on a flattened canvas, and represent how an specific
1316
+ frame should look is animatated)</span></p>
1317
+
1318
+ <p class="imquote">If images are not the same size as the page
1319
+ canvas size of first image, then it is alpha composed using
1320
+ 'Copy' onto the previous frame compared. That is the
1321
+ differences only within the overlay area are looked at.</p>
1322
+
1323
+ <p class="imquote">No dispose methods are applied, though this
1324
+ does not matter for animations which are a fully coalesced
1325
+ sequence of images.</p>
1326
+
1327
+ <p>With OptimizeLayer, <code>optimize_layers</code>
1328
+ <span class="imquote">compares each image the GIF disposed
1329
+ forms of the previous image in the sequence. From this it
1330
+ attempts to select the smallest cropped image to replace each
1331
+ frame, while preserving the results of the
1332
+ animation.</span></p>
1333
+
1334
+ <p>OptimizePlusLayer is the same as OptimizeLayers,
1335
+ <span class="imquote">but may also add or even remove extra
1336
+ frames in the animation, if it improves the total number of
1337
+ pixels in the resulting GIF animation.</span></p>
1338
+
1339
+ <p>With DisposeLayer, <code>optimize_layers</code> <span class=
1340
+ "imquote">returns the coalesced frames of a GIF animation as it
1341
+ would appear after the GIF dispose method of that frame has
1342
+ been applied. That is it returns the appearance of each frame
1343
+ before the next is overlaid.</span></p>
1344
+
1345
+ <p>The <code>optimize_layers</code> method corresponds to the
1346
+ <code>-layers</code> option on ImageMagick's
1347
+ <code>convert</code> and <code>mogrify</code> commands. Anthony
1348
+ Thyssen's excellent <a href=
1349
+ "http://www.cit.gu.edu.au/~anthony/graphics/imagick6">Examples
1350
+ of ImageMagick Usage</a> site has very detailed <a href=
1351
+ "http://www.cit.gu.edu.au/~anthony/graphics/imagick6/anim_basics/#optimize">
1352
+ information and examples</a> of the <code>-layers</code> option
1353
+ and and the optimization methods .</p>
1354
+
1355
+ <h4>Arguments</h4>
1356
+
1357
+ <p>One of the following <code>MagickLayerMethod</code>
1358
+ values:</p>
1359
+
1360
+ <ul>
1361
+ <li>CoalesceLayer</li>
1362
+
1363
+ <li>CompareAnyLayer</li>
1364
+
1365
+ <li>CompareClearLayer</li>
1366
+
1367
+ <li>CompareOverlayLayer</li>
1368
+
1369
+ <li>DisposeLayer</li>
1370
+
1371
+ <li>OptimizeLayer</li>
1372
+
1373
+ <li>OptimizePlusLayer</li>
1374
+ </ul>
1375
+
1376
+ <h4>Returns</h4>
1377
+
1378
+ <p>A new imagelist</p>
1379
+
1380
+ <h4>See also</h4>
1381
+
1382
+ <p><a href="#deconstruct">deconstruct</a> is an alias for
1383
+ <code>optimize_layers</code> with the
1384
+ <code>CompareAnyLayer</code> argument.</p>
1385
+
1386
+ <p><a href="#coalesce">coalesce</a> is an alias for
1387
+ <code>optimize_layers</code> with the
1388
+ <code>CoalesceLayer</code> argument.</p>
1389
+
1390
+ <h4>Magick API</h4>
1391
+
1392
+ <p>OptimizeImageLayers, CompareImageLayers (available in
1393
+ ImageMagick 6.2.6)</p>
1394
+ </div>
1395
+
1291
1396
  <div class="sig">
1292
1397
  <h3 id="ping">ping</h3>
1293
1398
 
@@ -1392,14 +1497,13 @@ puts "The image has #{i.columns} columns and #{i.rows} rows." &raquo;
1392
1497
  <dd><span class="imquote">Calculate quantization errors when
1393
1498
  quantizing the image.</span> Stores the results for each
1394
1499
  image in the imagelist <a href=
1395
- "imageattrs.html#Image.mean_error_per_pixel">mean_error_per_pixel</a>,
1500
+ "imageattrs.html#mean_error_per_pixel">mean_error_per_pixel</a>,
1396
1501
  <a href=
1397
- "imageattrs.html#Image.normalized_maximum_error">normalized_maximum_error</a>,
1502
+ "imageattrs.html#normalized_maximum_error">normalized_maximum_error</a>,
1398
1503
  and <a href=
1399
- "imageattrs.html#Image.normalized_mean_error">normalized_mean_error</a>
1504
+ "imageattrs.html#normalized_mean_error">normalized_mean_error</a>
1400
1505
  attributes. Stores the number of colors used for the image in
1401
- the <a href=
1402
- "imageattrs.html#Image.total_colors">total_colors</a>
1506
+ the <a href="imageattrs.html#total_colors">total_colors</a>
1403
1507
  attribute.</dd>
1404
1508
  </dl>
1405
1509