rmagick 1.8.2 → 1.8.3

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.

data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ RMagick 1.8.3
2
+ o Tested with ImageMagick 6.2.3-2
3
+ o Added comment, delay, dispose, fill, gravity, and label attributes to
4
+ Image::Info
5
+
1
6
  RMagick 1.8.2
2
7
  o Fix bug #1983, potential buffer overflow in version_constants
3
8
  o Added feature #2015, support the pointsize, authenticate,
@@ -1,14 +1,14 @@
1
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
2
  <html>
3
3
  <head>
4
- <title>RMagick 1.8.2 README</title>
4
+ <title>RMagick 1.8.3 README</title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6
6
  <meta name="GENERATOR" content="BlueCloth">
7
7
  </head>
8
8
  <body>
9
- <h1>RMagick 1.8.2 README</h1>
9
+ <h1>RMagick 1.8.3 README</h1>
10
10
 
11
- <h2>06/10/05</h2>
11
+ <h2>06/17/05</h2>
12
12
 
13
13
  <h2>Table Of Contents</h2>
14
14
 
@@ -42,7 +42,7 @@ ImageMagick and GraphicsMagick image processing libraries.</p>
42
42
 
43
43
  <p><strong>Author:</strong> Tim Hunter</p>
44
44
 
45
- <p><strong>Email:</strong> <a href="&#109;a&#105;&#x6C;&#x74;&#x6F;:r&#109;a&#x67;&#105;&#099;&#x6B;&#064;&#x72;&#117;&#098;&#x79;&#x66;&#111;&#114;&#103;&#101;&#046;&#x6F;&#x72;&#x67;">r&#109;a&#x67;&#105;&#099;&#x6B;&#064;&#x72;&#117;&#098;&#x79;&#x66;&#111;&#114;&#103;&#101;&#046;&#x6F;&#x72;&#x67;</a></p>
45
+ <p><strong>Email:</strong> <a href="&#x6D;&#x61;&#x69;&#108;&#116;&#111;:&#x72;&#109;&#x61;g&#x69;&#099;&#x6B;&#064;&#114;&#117;&#x62;&#x79;&#x66;&#111;&#114;&#103;&#101;&#046;&#111;r&#103;">&#x72;&#109;&#x61;g&#x69;&#099;&#x6B;&#064;&#114;&#117;&#x62;&#x79;&#x66;&#111;&#114;&#103;&#101;&#046;&#111;r&#103;</a></p>
46
46
 
47
47
  <p><strong>RubyForge:</strong> <a href="http://rubyforge.org/projects/rmagick/">http://rubyforge.org/projects/rmagick/</a></p>
48
48
 
@@ -218,7 +218,7 @@ addition to the regular options, there are a few RMagick-specific options:</p>
218
218
 
219
219
  <h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
220
220
 
221
- <p>De-compress the RMagick-1.8.2.tar.gz archive and enter the top
221
+ <p>De-compress the RMagick-1.8.3.tar.gz archive and enter the top
222
222
  directory. Then type:</p>
223
223
 
224
224
  <pre><code>$ ./configure &lt;configuration options&gt;
@@ -239,9 +239,9 @@ $ make clean
239
239
 
240
240
  <p>When make is running the examples, if you get a message like this:</p>
241
241
 
242
- <pre><code>/home/you/RMagick-1.8.2/lib/RMagick.rb:11:in `require': libMagick.so.0:
242
+ <pre><code>/home/you/RMagick-1.8.3/lib/RMagick.rb:11:in `require': libMagick.so.0:
243
243
  cannot open shared object file: No such file or directory -
244
- /home/you/RMagick-1.8.2/ext/RMagick/RMagick.so (LoadError)
244
+ /home/you/RMagick-1.8.3/ext/RMagick/RMagick.so (LoadError)
245
245
  </code></pre>
246
246
 
247
247
  <p>you probably do not have the directory in which the ImageMagick or GraphicsMagick
@@ -261,7 +261,7 @@ systems, see the documentation for the dynamic loading facility.</p>
261
261
 
262
262
  <p>When make is running the examples, if you get a message like this:</p>
263
263
 
264
- <pre><code>hook /home/me/src/RMagick-1.8.2/./post-setup.rb failed:
264
+ <pre><code>hook /home/me/src/RMagick-1.8.3/./post-setup.rb failed:
265
265
  No such file or directory - "/tmp/rmagick6872.6"
266
266
  </code></pre>
267
267
 
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
- RMagick 1.8.2 README
1
+ RMagick 1.8.3 README
2
2
  ================================
3
- 06/10/05
3
+ 06/17/05
4
4
  --------
5
5
 
6
6
  Table Of Contents
@@ -188,7 +188,7 @@ addition to the regular options, there are a few RMagick-specific options:
188
188
 
189
189
  <h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
190
190
 
191
- De-compress the RMagick-1.8.2.tar.gz archive and enter the top
191
+ De-compress the RMagick-1.8.3.tar.gz archive and enter the top
192
192
  directory. Then type:
193
193
 
194
194
  $ ./configure <configuration options>
@@ -206,9 +206,9 @@ The message can also refer to "libGraphicsMagick". Typically this message means
206
206
  #### Cannot open shared object file
207
207
  When make is running the examples, if you get a message like this:
208
208
 
209
- /home/you/RMagick-1.8.2/lib/RMagick.rb:11:in `require': libMagick.so.0:
209
+ /home/you/RMagick-1.8.3/lib/RMagick.rb:11:in `require': libMagick.so.0:
210
210
  cannot open shared object file: No such file or directory -
211
- /home/you/RMagick-1.8.2/ext/RMagick/RMagick.so (LoadError)
211
+ /home/you/RMagick-1.8.3/ext/RMagick/RMagick.so (LoadError)
212
212
 
213
213
  you probably do not have the directory in which the ImageMagick or GraphicsMagick
214
214
  library is installed in your load path. An easy way to fix this is to define the
@@ -225,7 +225,7 @@ systems, see the documentation for the dynamic loading facility.
225
225
  #### No such file or directory - "/tmp/rmagick6872.6"
226
226
  When make is running the examples, if you get a message like this:
227
227
 
228
- hook /home/me/src/RMagick-1.8.2/./post-setup.rb failed:
228
+ hook /home/me/src/RMagick-1.8.3/./post-setup.rb failed:
229
229
  No such file or directory - "/tmp/rmagick6872.6"
230
230
 
231
231
  you probably do not have a temporary directory environment variable set. Set
data/configure CHANGED
@@ -1,6 +1,6 @@
1
1
  #! /bin/sh
2
2
  # Guess values for system-dependent variables and create Makefiles.
3
- # Generated by GNU Autoconf 2.59 for RMagick 1.8.2.
3
+ # Generated by GNU Autoconf 2.59 for RMagick 1.8.3.
4
4
  #
5
5
  # Report bugs to <rmagick@rubyforge.org>.
6
6
  #
@@ -268,9 +268,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
268
268
 
269
269
  # Identity of this package.
270
270
  PACKAGE_NAME='RMagick'
271
- PACKAGE_TARNAME='RMagick-1.8.2.tar.gz'
272
- PACKAGE_VERSION='1.8.2'
273
- PACKAGE_STRING='RMagick 1.8.2'
271
+ PACKAGE_TARNAME='RMagick-1.8.3.tar.gz'
272
+ PACKAGE_VERSION='1.8.3'
273
+ PACKAGE_STRING='RMagick 1.8.3'
274
274
  PACKAGE_BUGREPORT='rmagick@rubyforge.org'
275
275
 
276
276
  # Factoring default headers for most tests.
@@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then
779
779
  # Omit some internal or obsolete options to make the list less imposing.
780
780
  # This message is too long to be a string in the A/UX 3.1 sh.
781
781
  cat <<_ACEOF
782
- \`configure' configures RMagick 1.8.2 to adapt to many kinds of systems.
782
+ \`configure' configures RMagick 1.8.3 to adapt to many kinds of systems.
783
783
 
784
784
  Usage: $0 [OPTION]... [VAR=VALUE]...
785
785
 
@@ -836,7 +836,7 @@ fi
836
836
 
837
837
  if test -n "$ac_init_help"; then
838
838
  case $ac_init_help in
839
- short | recursive ) echo "Configuration of RMagick 1.8.2:";;
839
+ short | recursive ) echo "Configuration of RMagick 1.8.3:";;
840
840
  esac
841
841
  cat <<\_ACEOF
842
842
 
@@ -981,7 +981,7 @@ fi
981
981
  test -n "$ac_init_help" && exit 0
982
982
  if $ac_init_version; then
983
983
  cat <<\_ACEOF
984
- RMagick configure 1.8.2
984
+ RMagick configure 1.8.3
985
985
  generated by GNU Autoconf 2.59
986
986
 
987
987
  Copyright (C) 2003 Free Software Foundation, Inc.
@@ -995,7 +995,7 @@ cat >&5 <<_ACEOF
995
995
  This file contains any messages produced by compilers while
996
996
  running configure, to aid debugging if configure makes a mistake.
997
997
 
998
- It was created by RMagick $as_me 1.8.2, which was
998
+ It was created by RMagick $as_me 1.8.3, which was
999
999
  generated by GNU Autoconf 2.59. Invocation command line was
1000
1000
 
1001
1001
  $ $0 $@
@@ -7566,6 +7566,71 @@ _ACEOF
7566
7566
 
7567
7567
  fi
7568
7568
 
7569
+ echo "$as_me:$LINENO: checking for UndefinedGravity enum value" >&5
7570
+ echo $ECHO_N "checking for UndefinedGravity enum value... $ECHO_C" >&6
7571
+ if test "${rm_cv_enum_undefinedgravity+set}" = set; then
7572
+ echo $ECHO_N "(cached) $ECHO_C" >&6
7573
+ else
7574
+ cat >conftest.$ac_ext <<_ACEOF
7575
+ /* confdefs.h. */
7576
+ _ACEOF
7577
+ cat confdefs.h >>conftest.$ac_ext
7578
+ cat >>conftest.$ac_ext <<_ACEOF
7579
+ /* end confdefs.h. */
7580
+ #include <stdio.h>
7581
+ #if HAVE_SYS_TYPES_H
7582
+ #include <sys/types.h>
7583
+ #endif
7584
+ #include "magick/api.h"
7585
+ int
7586
+ main ()
7587
+ {
7588
+ GravityType x; x = UndefinedGravity
7589
+ ;
7590
+ return 0;
7591
+ }
7592
+ _ACEOF
7593
+ rm -f conftest.$ac_objext
7594
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7595
+ (eval $ac_compile) 2>conftest.er1
7596
+ ac_status=$?
7597
+ grep -v '^ *+' conftest.er1 >conftest.err
7598
+ rm -f conftest.er1
7599
+ cat conftest.err >&5
7600
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7601
+ (exit $ac_status); } &&
7602
+ { ac_try='test -z "$ac_c_werror_flag"
7603
+ || test ! -s conftest.err'
7604
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605
+ (eval $ac_try) 2>&5
7606
+ ac_status=$?
7607
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608
+ (exit $ac_status); }; } &&
7609
+ { ac_try='test -s conftest.$ac_objext'
7610
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611
+ (eval $ac_try) 2>&5
7612
+ ac_status=$?
7613
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614
+ (exit $ac_status); }; }; then
7615
+ rm_cv_enum_undefinedgravity='yes'
7616
+ else
7617
+ echo "$as_me: failed program was:" >&5
7618
+ sed 's/^/| /' conftest.$ac_ext >&5
7619
+
7620
+ rm_cv_enum_undefinedgravity='no'
7621
+ fi
7622
+ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7623
+ fi
7624
+ echo "$as_me:$LINENO: result: $rm_cv_enum_undefinedgravity" >&5
7625
+ echo "${ECHO_T}$rm_cv_enum_undefinedgravity" >&6
7626
+
7627
+ if test "$rm_cv_enum_undefinedgravity" = yes; then
7628
+ cat >>confdefs.h <<\_ACEOF
7629
+ #define HAVE_UNDEFINEDGRAVITY 1
7630
+ _ACEOF
7631
+
7632
+ fi
7633
+
7569
7634
  if test "$rm_have_getimagequantumdepth" = yes; then
7570
7635
  # IM 6.0.5 changed the number of arguments to GetImageQuantumDepth.
7571
7636
  echo "$as_me:$LINENO: checking if GetImageQuantumDepth has only 1 argument" >&5
@@ -8388,7 +8453,7 @@ _ASBOX
8388
8453
  } >&5
8389
8454
  cat >&5 <<_CSEOF
8390
8455
 
8391
- This file was extended by RMagick $as_me 1.8.2, which was
8456
+ This file was extended by RMagick $as_me 1.8.3, which was
8392
8457
  generated by GNU Autoconf 2.59. Invocation command line was
8393
8458
 
8394
8459
  CONFIG_FILES = $CONFIG_FILES
@@ -8448,7 +8513,7 @@ _ACEOF
8448
8513
 
8449
8514
  cat >>$CONFIG_STATUS <<_ACEOF
8450
8515
  ac_cs_version="\\
8451
- RMagick config.status 1.8.2
8516
+ RMagick config.status 1.8.3
8452
8517
  configured by $0, generated by GNU Autoconf 2.59,
8453
8518
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
8454
8519
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  # RMagick configure.ac
3
3
 
4
- AC_INIT(RMagick, 1.8.2, rmagick@rubyforge.org, RMagick-1.8.2.tar.gz)
4
+ AC_INIT(RMagick, 1.8.3, rmagick@rubyforge.org, RMagick-1.8.3.tar.gz)
5
5
  echo "Configuring ${PACKAGE_STRING}"
6
6
 
7
7
  AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
@@ -392,6 +392,21 @@ if test "$rm_cv_enum_jpeg2000compression" = yes; then
392
392
  AC_DEFINE(HAVE_JPEG2000COMPRESSION)
393
393
  fi
394
394
 
395
+ AC_CACHE_CHECK(for UndefinedGravity enum value, rm_cv_enum_undefinedgravity,
396
+ [AC_TRY_COMPILE(
397
+ [#include <stdio.h>
398
+ #if HAVE_SYS_TYPES_H
399
+ #include <sys/types.h>
400
+ #endif
401
+ #include "magick/api.h"],
402
+ [GravityType x; x = UndefinedGravity],
403
+ rm_cv_enum_undefinedgravity='yes',
404
+ rm_cv_enum_undefinedgravity='no')])
405
+
406
+ if test "$rm_cv_enum_undefinedgravity" = yes; then
407
+ AC_DEFINE(HAVE_UNDEFINEDGRAVITY)
408
+ fi
409
+
395
410
  if test "$rm_have_getimagequantumdepth" = yes; then
396
411
  # IM 6.0.5 changed the number of arguments to GetImageQuantumDepth.
397
412
  AC_CACHE_CHECK(if GetImageQuantumDepth has only 1 argument, rm_cv_args_get_image_quantum_depth,
@@ -148,7 +148,7 @@
148
148
 
149
149
  <dd>An extended form of the <code>Version</code> constant with
150
150
  the format shown here:<br />
151
- <code>This is RMagick 1.4.0 ($Date: 2005/04/30 14:29:49 $)
151
+ <code>This is RMagick 1.4.0 ($Date: 2005/06/12 22:13:21 $)
152
152
  Copyright (C) 2005 by Timothy P. Hunter<br />
153
153
  Built with ImageMagick 6.0.0 02/25/04 Q8
154
154
  http://www.imagemagick.org<br />
@@ -765,11 +765,20 @@
765
765
  <dl>
766
766
  <dt>UndefinedDispose</dt>
767
767
 
768
+ <dd>No disposal specified.</dd>
769
+
768
770
  <dt>NoneDispose</dt>
769
771
 
772
+ <dd>Do not dispose between frames.</dd>
773
+
770
774
  <dt>BackgroundDispose</dt>
771
775
 
776
+ <dd>Overwrite the image area with the background color.</dd>
777
+
772
778
  <dt>PreviousDispose</dt>
779
+
780
+ <dd>Overwrite the image area with what was there prior to
781
+ rendering the image.</dd>
773
782
  </dl>
774
783
 
775
784
  <h3 class="const" id="EndianType">EndianType</h3>
@@ -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 Mac OS X (vers 1st September 2004), see www.w3.org" />
7
+ "HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
8
8
 
9
9
  <title>RMagick: ImageMagick/GraphicsMagick Conventions</title>
10
10
  <meta http-equiv="Content-Type" content=
@@ -99,7 +99,7 @@
99
99
  <h2 id="formats">Image formats and filenames</h2>
100
100
 
101
101
  <p>&times;Magick supports over 90 major <a href=
102
- "http://www.imagemagick.org/www/formats.html">image
102
+ "http://www.imagemagick.org/script/formats.php">image
103
103
  formats</a>.</p>
104
104
 
105
105
  <p>&times;Magick determines the format (GIF, PNG, JPEG, etc.) of
@@ -223,8 +223,9 @@
223
223
  <p><em>Hint:</em> You can specify the transparent color as
224
224
  "none", "transparent", or "#000000ff".</p>
225
225
 
226
- <p><a href="http://www.imagemagick.org/www/color.html">This</a>
227
- is ImageMagick's page about color names.</p>
226
+ <p><a href=
227
+ "http://www.imagemagick.org/script/command-line-options.php#fill">
228
+ This</a> is ImageMagick's page about color names.</p>
228
229
 
229
230
  <h2 id="geometry">The geometry string</h2>
230
231
 
@@ -240,8 +241,9 @@
240
241
  </pre>
241
242
 
242
243
  <p><a href=
243
- "http://www.imagemagick.org/www/utilities.html">This</a> is the
244
- ImageMagick description of the geometry string:</p>
244
+ "http://www.imagemagick.org/script/command-line-options.php#geometry">
245
+ This</a> is the ImageMagick description of the geometry
246
+ string:</p>
245
247
 
246
248
  <div class="imquote">
247
249
  <p>By default, the width and height are maximum values. That
@@ -334,6 +336,35 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
334
336
  more examples of reading built-in formats.</p>
335
337
 
336
338
  <div id="bi_format_list">
339
+ <h4>caption<sup>*</sup></h4>
340
+
341
+ <p>The caption format is used to create an image from a text
342
+ string. Ex: "caption:My caption text".</p>
343
+
344
+ <p>If you specify only the width in the <code>size</code>
345
+ argument, &times;Magick will wrap the text and compute the
346
+ necessary height. In addition to <code>size</code> (which is
347
+ required) you can use the following <a href=
348
+ "info.html">optional arguments</a>:</p>
349
+
350
+ <ul>
351
+ <li>antialias</li>
352
+
353
+ <li>background_color</li>
354
+
355
+ <li>border_color</li>
356
+
357
+ <li>density</li>
358
+
359
+ <li>fill</li>
360
+
361
+ <li>font</li>
362
+
363
+ <li>gravity</li>
364
+
365
+ <li>pointsize</li>
366
+ </ul>
367
+
337
368
  <h4>gradient<sup>*</sup></h4>
338
369
 
339
370
  <p>Gradient filenames have the form
@@ -369,7 +400,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
369
400
  may be referenced by specifying the pattern name. For example,
370
401
  <code>pattern:checkerboard</code>. For a list of acceptable
371
402
  patterns, see <a href=
372
- "http://www.imagemagick.org/www/formats.html">this
403
+ "http://www.imagemagick.org/script/formats.php">this
373
404
  page.</a></p>
374
405
 
375
406
  <h4>plasma<sup>*</sup></h4>
@@ -392,7 +423,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
392
423
  an image.</p>
393
424
  </div>
394
425
 
395
- <p class="spacer"> </p>
426
+ <p class="spacer">&nbsp;</p>
396
427
 
397
428
  <div class="nav">
398
429
  &laquo; <a href="usage.html">Prev</a> | <a href=
@@ -399,7 +399,7 @@
399
399
  <code>Magick::Long_version</code> constant:</p>
400
400
  <pre class="example" id="version">
401
401
  irb(main):001:0&gt; puts Magick::Long_version
402
- This is RMagick 1.7.0 ($Date: 2005/04/30 14:43:19 $) Copyright (C) 2004 by Timothy P. Hunter
402
+ This is RMagick 1.7.0 ($Date: 2005/06/12 22:13:21 $) Copyright (C) 2004 by Timothy P. Hunter
403
403
  Built with GraphicsMagick 1.1.4 2004-11-13 Q8 http://www.GraphicsMagick.org/
404
404
  Built for ruby 1.8.1 (2003-12-25) [i686-linux]
405
405
  Web page: http://rmagick.rubyforge.org
@@ -415,7 +415,7 @@ Email: rmagick@rubyforge.org
415
415
  your questions to <code>comp.lang.ruby</code>. For help with
416
416
  ImageMagick or GraphicsMagick, join the ImageMagick or
417
417
  GraphicsMagick mailing list. See the instructions at <a href=
418
- "http://www.imagemagick.org/www/magick-list.html">http://www.imagemagick.org/www/magick-list.html</a>
418
+ "http://www.imagemagick.org/script/mailing-list.php">http://www.imagemagick.org/script/mailing-list.php</a>
419
419
  or <a href=
420
420
  "http://sourceforge.net/projects/graphicsmagick/">http://sourceforge.net/projects/graphicsmagick/</a>.</p>
421
421
 
@@ -83,46 +83,58 @@
83
83
 
84
84
  <li><a href="#colorspace">colorspace</a></li>
85
85
 
86
+ <li><a href="#comment">comment</a></li>
87
+
86
88
  <li><a href="#compression">compression</a></li>
87
89
 
90
+ <li><a href="#delay">delay</a></li>
91
+
88
92
  <li><a href="#density">density</a></li>
89
93
 
90
94
  <li><a href="#depth">depth</a></li>
91
95
 
96
+ <li><a href="#dispose">dispose</a></li>
97
+
92
98
  <li><a href="#dither">dither</a></li>
93
99
 
94
100
  <li><a href="#extract">extract</a></li>
95
-
96
- <li><a href="#filename">filename</a></li>
97
101
  </ul>
98
102
  </div>
99
103
 
100
104
  <div class="toccol">
101
105
  <ul>
106
+ <li><a href="#filename">filename</a></li>
107
+
108
+ <li><a href="#fill">fill</a></li>
109
+
102
110
  <li><a href="#font">font</a></li>
103
111
 
104
112
  <li><a href="#format">format</a></li>
105
113
 
106
114
  <li><a href="#fuzz">fuzz</a></li>
107
115
 
116
+ <li><a href="#gravity">gravity</a></li>
117
+
108
118
  <li><a href="#image_type">image_type</a></li>
109
119
 
110
120
  <li><a href="#interlace">interlace</a></li>
111
121
 
122
+ <li><a href="#label">label</a></li>
123
+
112
124
  <li><a href="#matte_color">matte_color</a></li>
113
125
 
114
126
  <li><a href="#monochrome">monochrome</a></li>
115
127
 
116
128
  <li><a href="#number_scenes">number_scenes</a></li>
117
-
118
- <li><a href="#page">page</a></li>
119
-
120
- <li><a href="#pointsize">pointsize</a></li>
121
129
  </ul>
122
130
  </div>
123
131
 
124
132
  <div class="toccol">
125
133
  <ul>
134
+ <li><a href="#page">page</a></li>
135
+
136
+ <li><a href="#pointsize">pointsize</a></li>
137
+
126
138
  <li><a href="#quality">quality</a></li>
127
139
 
128
140
  <li><a href="#sampling_factor">sampling_factor</a></li>
@@ -401,7 +413,7 @@ self.undefine("tiff", "bits-per-sample")
401
413
  <h3 id="background_color">background_color</h3>
402
414
 
403
415
  <p><span class="arg">self.</span>background_color= <span class=
404
- "arg">aPixel</span> or <em>aPixel</em></p>
416
+ "arg">aString</span> or <span class="arg">aPixel</span></p>
405
417
  </div>
406
418
 
407
419
  <div class="desc">
@@ -449,6 +461,28 @@ self.undefine("tiff", "bits-per-sample")
449
461
  "constants.html#ColorspaceType">ColorspaceType</a> constant.
450
462
  </div>
451
463
 
464
+ <div class="sig">
465
+ <h3 id="comment">comment</h3>
466
+
467
+ <p><span class="arg">self.</span>comment= <span class=
468
+ "arg">aString</span></p>
469
+ </div>
470
+
471
+ <div class="desc">
472
+ <h4>Description</h4>
473
+
474
+ <p class="imquote">Use this option to assign a specific comment
475
+ to the image, when writing to an image format that supports
476
+ comments.</p>
477
+
478
+ <h4>Arguments</h4>
479
+
480
+ <p class="imquote">You can include the image filename, type,
481
+ width, height, or other image attribute by embedding special
482
+ format characters listed under the <a href=
483
+ "draw.html#annotate">annotate</a> method.</p>
484
+ </div>
485
+
452
486
  <div class="sig">
453
487
  <h3 id="compression">compression</h3>
454
488
 
@@ -655,6 +689,23 @@ self.undefine("tiff", "bits-per-sample")
655
689
  and <code>height</code> is the vertical resolution.</p>
656
690
  </div>
657
691
 
692
+ <div class="sig">
693
+ <h3 id="delay">delay</h3>
694
+
695
+ <p><span class="arg">self.</span>delay= <span class=
696
+ "arg">anInteger</span></p>
697
+ </div>
698
+
699
+ <div class="desc">
700
+ <h4>Description</h4>
701
+
702
+ <p class="imquote">This attribute is useful for regulating the
703
+ animation of image sequences. <em>delay</em>/100 seconds must
704
+ expire before the display of the next image. The default is no
705
+ delay between each showing of the image sequence. The maximum
706
+ delay is 65535.</p>
707
+ </div>
708
+
658
709
  <div class="sig">
659
710
  <h3 id="depth">depth</h3>
660
711
 
@@ -678,6 +729,25 @@ self.undefine("tiff", "bits-per-sample")
678
729
  "#size"><code>size</code></a>.</p>
679
730
  </div>
680
731
 
732
+ <div class="sig">
733
+ <h3 id="dispose">dispose</h3>
734
+
735
+ <p><span class="arg">self.</span>dispose= <span class=
736
+ "arg">aDisposeType</span></p>
737
+ </div>
738
+
739
+ <div class="desc">
740
+ <h4>Description</h4>
741
+
742
+ <p class="imquote">The argument indicates the way in which the
743
+ graphic is to be treated after being displayed.</p>
744
+
745
+ <h4>Argument</h4>
746
+
747
+ <p>A <a href="constants.html#DisposeType">DisposeType</a>
748
+ constant.</p>
749
+ </div>
750
+
681
751
  <div class="sig">
682
752
  <h3 id="dither">dither</h3>
683
753
 
@@ -739,6 +809,26 @@ self.undefine("tiff", "bits-per-sample")
739
809
  <p>See <a href="image1.html#capture">capture</a>.</p>
740
810
  </div>
741
811
 
812
+ <div class="sig">
813
+ <h3 id="fill">fill</h3>
814
+
815
+ <p><span class="arg">self.</span>fill= <span class=
816
+ "arg">aString</span> or <span class="arg">aPixel</span></p>
817
+ </div>
818
+
819
+ <div class="desc">
820
+ <h4>Description</h4>
821
+
822
+ <p>In the <code>Image::Info</code> class, the <code>fill</code>
823
+ attribute specifies the fill color to use when creating an
824
+ image with the "caption:" format..</p>
825
+
826
+ <h4>Arguments</h4>
827
+
828
+ <p>A <a href="imusage.html#color_names">color name</a> or a
829
+ <a href="struct.html#Pixel">aPixel</a>.</p>
830
+ </div>
831
+
742
832
  <div class="sig">
743
833
  <h3 id="font">font</h3>
744
834
 
@@ -797,6 +887,34 @@ self.undefine("tiff", "bits-per-sample")
797
887
  0.05*MaxRGB.</p>
798
888
  </div>
799
889
 
890
+ <div class="sig">
891
+ <h3 id="gravity">gravity</h3>
892
+
893
+ <p><span class="arg">self.</span>gravity= <span class=
894
+ "arg">aGravityType</span></p>
895
+ </div>
896
+
897
+ <div class="desc">
898
+ <h4>Description</h4>
899
+
900
+ <p class="imquote">The direction text gravitates to when
901
+ annotating the image.</p>
902
+
903
+ <p class="imquote">The direction you choose specifies where to
904
+ position the text when annotating the image. For example, a
905
+ gravity of <code>CenterGravity</code> forces the text to be
906
+ centered within the image. By default, the image gravity is
907
+ <code>NorthWestGravity</code>.</p>
908
+
909
+ <p>This attribute can be used to position the text when
910
+ creating an image with the "caption:" format.</p>
911
+
912
+ <h4>Arguments</h4>
913
+
914
+ <p>A <a href="constants.html#GravityType">GravityType</a>
915
+ constant.</p>
916
+ </div>
917
+
800
918
  <div class="sig">
801
919
  <h3 id="image_type">image_type</h3>
802
920
 
@@ -837,8 +955,29 @@ self.undefine("tiff", "bits-per-sample")
837
955
  interlaced GIF or progressive JPEG image.</span> The default is
838
956
  NoInterlace.</p>
839
957
 
840
- <h4>Arguments</h4>An <a href=
841
- "constants.html#InterlaceType">InterlaceType</a> constant.
958
+ <h4>Arguments</h4>
959
+
960
+ <p>An <a href="constants.html#InterlaceType">InterlaceType</a>
961
+ constant.</p>
962
+ </div>
963
+
964
+ <div class="sig">
965
+ <h3 id="label">label</h3>
966
+
967
+ <p><span class="arg">self.</span>label= <span class=
968
+ "arg">aString</span></p>
969
+ </div>
970
+
971
+ <div class="desc">
972
+ <h4>Description</h4>
973
+
974
+ <p><span class="imquote">Use this option to assign a specific
975
+ label to the image, when writing to an image format that
976
+ supports labels, such as TIFF, PNG, MIFF, or PostScript. You
977
+ can include the the image filename, type, width, height, or
978
+ other image attribute by embedding special format
979
+ characters.</span> See <a href=
980
+ "draw.html#annotate">annotate</a> for details.</p>
842
981
  </div>
843
982
 
844
983
  <div class="sig">
@@ -1,4 +1,4 @@
1
- MANIFEST for RMagick-1.8.2 - 18:44:23 06/10/05
1
+ MANIFEST for RMagick-1.8.3 - 17:30:19 06/17/05
2
2
 
3
3
  configure
4
4
  README.html
@@ -1,4 +1,4 @@
1
- /* $Id: rmagick.h,v 1.85 2005/06/10 22:41:19 rmagick Exp $ */
1
+ /* $Id: rmagick.h,v 1.88 2005/06/14 22:41:02 rmagick Exp $ */
2
2
  /*=============================================================================
3
3
  | Copyright (C) 2005 by Timothy P. Hunter
4
4
  | Name: rmagick.h
@@ -19,6 +19,14 @@
19
19
  #include "ruby.h"
20
20
  #include "intern.h"
21
21
  #include "rubyio.h"
22
+
23
+
24
+ // Undef Ruby's versions of these symbols
25
+ #undef PACKAGE_VERSION
26
+ #undef PACKAGE_NAME
27
+ #undef PACKAGE_STRING
28
+ #undef PACKAGE_BUGREPORT
29
+ #undef PACKAGE_TARNAME
22
30
  #include "magick/api.h"
23
31
 
24
32
 
@@ -192,6 +200,10 @@ typedef size_t magick_uint64_t;
192
200
  typedef unsigned int MagickBooleanType;
193
201
  #endif
194
202
 
203
+ #if !defined(HAVE_UNDEFINEDGRAVITY)
204
+ #define UndefinedGravity 0
205
+ #endif
206
+
195
207
  // This implements the "omitted storage class model" for external variables.
196
208
  // (Ref: Harbison & Steele.) The rmmain.c file defines MAIN, which causes
197
209
  // the single defining declarations to be generated. No other source files
@@ -403,6 +415,25 @@ EXTERN ID ID_y; // "y"
403
415
  ATTR_READER(class, attr)\
404
416
  ATTR_WRITER(class, attr)
405
417
 
418
+ /*
419
+ * Define functions to get/set attributes in Image::Info that
420
+ * use the Get/SetImageOption API.
421
+ */
422
+ #define OPTION_ATTR_READER(opt, key) \
423
+ VALUE Info_##opt(VALUE self)\
424
+ {\
425
+ return get_option(self, #key);\
426
+ }
427
+ #define OPTION_ATTR_WRITER(opt, key) \
428
+ VALUE Info_##opt##_eq(VALUE self, VALUE string)\
429
+ {\
430
+ return set_option(self, #key, string);\
431
+ }
432
+ #define OPTION_ATTR_ACCESSOR(opt, key)\
433
+ OPTION_ATTR_READER(opt, key)\
434
+ OPTION_ATTR_WRITER(opt, key)
435
+
436
+
406
437
  /*
407
438
  * Declare Pixel channel attribute writers
408
439
  */
@@ -555,18 +586,24 @@ ATTR_ACCESSOR(Info, authenticate)
555
586
  ATTR_ACCESSOR(Info, background_color)
556
587
  ATTR_ACCESSOR(Info, border_color)
557
588
  ATTR_ACCESSOR(Info, colorspace)
589
+ ATTR_ACCESSOR(Info, comment)
558
590
  ATTR_ACCESSOR(Info, compression)
591
+ ATTR_ACCESSOR(Info, delay)
559
592
  ATTR_ACCESSOR(Info, density)
560
593
  ATTR_ACCESSOR(Info, depth)
594
+ ATTR_ACCESSOR(Info, dispose)
561
595
  ATTR_ACCESSOR(Info, dither)
562
596
  ATTR_ACCESSOR(Info, extract)
563
597
  ATTR_ACCESSOR(Info, filename)
598
+ ATTR_ACCESSOR(Info, fill)
564
599
  ATTR_ACCESSOR(Info, font)
565
600
  ATTR_ACCESSOR(Info, format)
566
601
  ATTR_ACCESSOR(Info, fuzz)
602
+ ATTR_ACCESSOR(Info, gravity)
567
603
  ATTR_ACCESSOR(Info, group)
568
604
  ATTR_ACCESSOR(Info, image_type)
569
605
  ATTR_ACCESSOR(Info, interlace)
606
+ ATTR_ACCESSOR(Info, label)
570
607
  ATTR_ACCESSOR(Info, matte_color)
571
608
  ATTR_ACCESSOR(Info, monochrome)
572
609
  ATTR_ACCESSOR(Info, number_scenes)
@@ -169,6 +169,8 @@
169
169
  #undef HAVE_THRESHOLDIMAGECHANNEL
170
170
  #undef HAVE_THUMBNAILIMAGE
171
171
  #undef HAVE_TINTIMAGE
172
+ /* Introduced in IM 6.0.0 */
173
+ #undef HAVE_UNDEFINEDGRAVITY
172
174
  #undef HAVE_UNISTD_H
173
175
  /* Introduced in IM 6.1.0 */
174
176
  #undef HAVE_UNSHARPMASKIMAGECHANNEL
@@ -1,4 +1,4 @@
1
- /* $Id: rminfo.c,v 1.30 2005/06/10 22:41:19 rmagick Exp $ */
1
+ /* $Id: rminfo.c,v 1.32 2005/06/12 21:07:56 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2005 by Timothy P. Hunter
4
4
  | Name: rminfo.c
@@ -8,6 +8,10 @@
8
8
 
9
9
  #include "rmagick.h"
10
10
 
11
+ static VALUE get_option(VALUE, char *);
12
+ static VALUE set_option(VALUE, char *, VALUE);
13
+
14
+
11
15
  DEF_ATTR_ACCESSOR(Info, antialias, bool)
12
16
 
13
17
  /*
@@ -283,6 +287,8 @@ Info_colorspace_eq(VALUE self, VALUE colorspace)
283
287
  return self;
284
288
  }
285
289
 
290
+ OPTION_ATTR_ACCESSOR(comment, Comment)
291
+
286
292
  /*
287
293
  Method: Info#compression
288
294
  Purpose: Get the compression type
@@ -417,6 +423,91 @@ Info_define(int argc, VALUE *argv, VALUE self)
417
423
  #endif
418
424
  }
419
425
 
426
+ /*
427
+ Method: Info#delay
428
+ Purpose: Get the delay attribute
429
+ Notes: Convert from string to numeric
430
+ */
431
+ VALUE
432
+ Info_delay(VALUE self)
433
+ {
434
+ #if defined(HAVE_SETIMAGEOPTION)
435
+ Info *info;
436
+ const char *delay;
437
+ char *p;
438
+ long d;
439
+
440
+ Data_Get_Struct(self, Info, info);
441
+
442
+ delay = GetImageOption(info, "delay");
443
+ if (delay)
444
+ {
445
+ d = strtol(delay, &p, 10);
446
+ if (*p != '\0')
447
+ {
448
+ rb_raise(rb_eRangeError, "failed to convert %s to Numeric", delay);
449
+ }
450
+ return LONG2NUM(d);
451
+ }
452
+ return Qnil;
453
+ #else
454
+ rm_not_implemented();
455
+ return (VALUE)0;
456
+ #endif
457
+ }
458
+
459
+ /*
460
+ * Will raise an exception if `arg' can't be converted to an int.
461
+ */
462
+ #if defined(HAVE_SETIMAGEOPTION)
463
+ static VALUE
464
+ arg_is_integer(VALUE arg)
465
+ {
466
+ double d;
467
+ d = NUM2INT(arg);
468
+ d = d; // satisfy icc
469
+ return arg;
470
+ }
471
+ #endif
472
+
473
+ /*
474
+ Method: Info#delay=
475
+ Purpose: Set the delay attribute
476
+ Notes: Convert from numeric value to string.
477
+ */
478
+ VALUE
479
+ Info_delay_eq(VALUE self, VALUE string)
480
+ {
481
+ #if defined(HAVE_SETIMAGEOPTION)
482
+ Info *info;
483
+ int delay;
484
+ int not_num;
485
+ char dstr[20];
486
+
487
+ Data_Get_Struct(self, Info, info);
488
+
489
+ if (NIL_P(string))
490
+ {
491
+ (void) RemoveImageOption(info, "delay");
492
+ }
493
+ else
494
+ {
495
+ not_num = 0;
496
+ rb_protect(arg_is_integer, string, &not_num);
497
+ if (not_num)
498
+ {
499
+ rb_raise(rb_eTypeError, "failed to convert %s into Integer", rb_class2name(CLASS_OF(string)));
500
+ }
501
+ delay = NUM2INT(string);
502
+ sprintf(dstr, "%d", delay);
503
+ (void) SetImageOption(info, "delay", dstr);
504
+ }
505
+ return self;
506
+ #else
507
+ rm_not_implemented();
508
+ return (VALUE)0;
509
+ #endif
510
+ }
420
511
 
421
512
  DEF_ATTR_READER(Info, density, str)
422
513
 
@@ -487,6 +578,107 @@ Info_depth_eq(VALUE self, VALUE depth)
487
578
  return self;
488
579
  }
489
580
 
581
+ /*
582
+ Method: Info#dispose
583
+ Purpose: Retrieve a dispose option string and convert it to
584
+ a DisposeType enumerator
585
+ */
586
+ #if defined(HAVE_SETIMAGEOPTION)
587
+ static struct
588
+ {
589
+ char *string;
590
+ char *enum_name;
591
+ DisposeType enumerator;
592
+ } Dispose_Option[] = {
593
+ { "Background", "BackgroundDispose", BackgroundDispose },
594
+ { "None", "NoneDispose", NoneDispose },
595
+ { "Previous", "PreviousDispose", PreviousDispose },
596
+ { "Undefined", "UndefinedDispose", UndefinedDispose },
597
+ { "0", "UndefinedDispose", UndefinedDispose },
598
+ { "1", "NoneDispose", NoneDispose },
599
+ { "2", "BackgroundDispose", BackgroundDispose },
600
+ { "3", "PreviousDispose", PreviousDispose },
601
+ };
602
+ #define N_DISPOSE_OPTIONS (sizeof(Dispose_Option)/sizeof(Dispose_Option[0]))
603
+ #endif
604
+
605
+ VALUE
606
+ Info_dispose(VALUE self)
607
+ {
608
+ #if defined(HAVE_SETIMAGEOPTION)
609
+ Info *info;
610
+ int x;
611
+ ID dispose_id;
612
+ const char *dispose;
613
+
614
+ Data_Get_Struct(self, Info, info);
615
+
616
+ dispose_id = rb_intern("UndefinedDispose");
617
+
618
+ // Map the dispose option string to a DisposeType enumerator.
619
+ dispose=GetImageOption(info, "dispose");
620
+ if (dispose)
621
+ {
622
+ for (x = 0; x < N_DISPOSE_OPTIONS; x++)
623
+ {
624
+ if (strcmp(dispose, Dispose_Option[x].string) == 0)
625
+ {
626
+ dispose_id = rb_intern(Dispose_Option[x].enum_name);
627
+ break;
628
+ }
629
+ }
630
+ }
631
+
632
+ return rb_const_get(Module_Magick, dispose_id);
633
+ #else
634
+ rm_not_implemented();
635
+ return (VALUE)0;
636
+ #endif
637
+ }
638
+
639
+ /*
640
+ Method: Info#dispose=
641
+ Purpose: Convert a DisposeType enumerator into the equivalent
642
+ dispose option string
643
+ */
644
+ VALUE
645
+ Info_dispose_eq(VALUE self, VALUE disp)
646
+ {
647
+ #if defined(HAVE_SETIMAGEOPTION)
648
+ Info *info;
649
+ DisposeType dispose;
650
+ char *option;
651
+ int x;
652
+
653
+ Data_Get_Struct(self, Info, info);
654
+
655
+ if (NIL_P(disp))
656
+ {
657
+ (void) RemoveImageOption(info, "dispose");
658
+ return self;
659
+ }
660
+
661
+ VALUE_TO_ENUM(disp, dispose, DisposeType);
662
+ option = "Undefined";
663
+
664
+ for(x = 0; x < N_DISPOSE_OPTIONS; x++)
665
+ {
666
+ if (dispose == Dispose_Option[x].enumerator)
667
+ {
668
+ option = Dispose_Option[x].string;
669
+ break;
670
+ }
671
+ }
672
+
673
+ (void) SetImageOption(info, "dispose", option);
674
+ return self;
675
+
676
+ #else
677
+ rm_not_implemented();
678
+ return (VALUE)0;
679
+ #endif
680
+ }
681
+
490
682
  DEF_ATTR_ACCESSOR(Info, dither, bool)
491
683
 
492
684
  #ifdef HAVE_IMAGE_EXTRACT_INFO
@@ -649,6 +841,37 @@ Info_filename_eq(VALUE self, VALUE filename)
649
841
  return self;
650
842
  }
651
843
 
844
+
845
+ /*
846
+ Method: Info#fill
847
+ Purpose: return the fill (a.k.a pen) color as a String
848
+ Note: Compare with Image#fill!
849
+ */
850
+ VALUE
851
+ Info_fill(VALUE self)
852
+ {
853
+ Info *info;
854
+
855
+ Data_Get_Struct(self, Info, info);
856
+ return PixelPacket_to_Color_Name_Info(info, &info->pen);
857
+ }
858
+
859
+ /*
860
+ Method: Info#fill=<aString>
861
+ Purpose: set the fill (a.k.a. pen) color
862
+ Raises: ArgumentError
863
+ */
864
+ VALUE
865
+ Info_fill_eq(VALUE self, VALUE color)
866
+ {
867
+ Info *info;
868
+
869
+ Data_Get_Struct(self, Info, info);
870
+ Color_to_PixelPacket(&info->pen, color);
871
+ return self;
872
+ }
873
+
874
+
652
875
  /*
653
876
  Methods: aString=Info#font
654
877
  Info#font=aString
@@ -742,6 +965,112 @@ VALUE Info_fuzz_eq(VALUE self, VALUE fuzz)
742
965
  return self;
743
966
  }
744
967
 
968
+ /*
969
+ Method: Info#gravity
970
+ Purpose: Return the value of the gravity option as a GravityType enumerator
971
+ */
972
+
973
+ #if defined(HAVE_SETIMAGEOPTION)
974
+ static struct
975
+ {
976
+ char *string;
977
+ char *enum_name;
978
+ GravityType enumerator;
979
+ } Gravity_Option[] = {
980
+ { "Undefined", "UndefinedGravity", UndefinedGravity },
981
+ { "None", "UndefinedGravity", UndefinedGravity },
982
+ { "Center", "CenterGravity", CenterGravity },
983
+ { "East", "EastGravity", EastGravity},
984
+ { "Forget", "ForgetGravity", ForgetGravity },
985
+ { "NorthEast", "NorthEastGravity", NorthEastGravity },
986
+ { "North", "NorthGravity", NorthGravity },
987
+ { "NorthWest", "NorthWestGravity", NorthWestGravity },
988
+ { "SouthEast", "SouthEastGravity", SouthEastGravity },
989
+ { "South", "SouthGravity", SouthGravity },
990
+ { "SouthWest", "SouthWestGravity", SouthWestGravity },
991
+ { "West", "WestGravity", WestGravity },
992
+ { "Static", "StaticGravity", StaticGravity }
993
+ };
994
+ #define N_GRAVITY_OPTIONS (sizeof(Gravity_Option)/sizeof(Gravity_Option[0]))
995
+ #endif
996
+
997
+ VALUE Info_gravity(VALUE self)
998
+ {
999
+ #if defined(HAVE_SETIMAGEOPTION)
1000
+ Info *info;
1001
+ const char *gravity;
1002
+ int x;
1003
+ ID gravity_id;
1004
+
1005
+ Data_Get_Struct(self, Info, info);
1006
+
1007
+ gravity_id = rb_intern("UndefinedGravity");
1008
+
1009
+ // Map the gravity option string to a GravityType enumerator.
1010
+ gravity=GetImageOption(info, "gravity");
1011
+ if (gravity)
1012
+ {
1013
+ for (x = 0; x < N_GRAVITY_OPTIONS; x++)
1014
+ {
1015
+ if (strcmp(gravity, Gravity_Option[x].string) == 0)
1016
+ {
1017
+ gravity_id = rb_intern(Gravity_Option[x].enum_name);
1018
+ break;
1019
+ }
1020
+ }
1021
+ }
1022
+
1023
+ return rb_const_get(Module_Magick, gravity_id);
1024
+
1025
+ #else
1026
+ rm_not_implemented();
1027
+ return (VALUE)0;
1028
+ #endif
1029
+ }
1030
+
1031
+ /*
1032
+ Method: Info#gravity=
1033
+ Purpose: Convert a GravityType enum to a gravity option name and
1034
+ store in the Info structure
1035
+ */
1036
+ VALUE
1037
+ Info_gravity_eq(VALUE self, VALUE grav)
1038
+ {
1039
+ #if defined(HAVE_SETIMAGEOPTION)
1040
+ Info *info;
1041
+ GravityType gravity;
1042
+ char *option;
1043
+ int x;
1044
+
1045
+ Data_Get_Struct(self, Info, info);
1046
+
1047
+ if (NIL_P(grav))
1048
+ {
1049
+ (void) RemoveImageOption(info, "gravity");
1050
+ return self;
1051
+ }
1052
+
1053
+ VALUE_TO_ENUM(grav, gravity, GravityType);
1054
+ option = "Undefined";
1055
+
1056
+ for(x = 0; x < N_GRAVITY_OPTIONS; x++)
1057
+ {
1058
+ if (gravity == Gravity_Option[x].enumerator)
1059
+ {
1060
+ option = Gravity_Option[x].string;
1061
+ break;
1062
+ }
1063
+ }
1064
+
1065
+ (void) SetImageOption(info, "gravity", option);
1066
+ return self;
1067
+
1068
+ #else
1069
+ rm_not_implemented();
1070
+ return (VALUE)0;
1071
+ #endif
1072
+ }
1073
+
745
1074
 
746
1075
  DEF_ATTR_ACCESSOR(Info, group, long)
747
1076
 
@@ -803,6 +1132,8 @@ Info_interlace_eq(VALUE self, VALUE inter)
803
1132
  return self;
804
1133
  }
805
1134
 
1135
+ OPTION_ATTR_ACCESSOR(label, Label)
1136
+
806
1137
  /*
807
1138
  Method: Info#matte_color
808
1139
  Purpose: return the name of the matte color as a String
@@ -895,7 +1226,22 @@ Info_orientation_eq(VALUE self, VALUE inter)
895
1226
  #endif
896
1227
  }
897
1228
 
898
- DEF_ATTR_READER(Info, page, str)
1229
+ VALUE
1230
+ Info_page(VALUE self)
1231
+ {
1232
+ Info *info;
1233
+ const char *page;
1234
+
1235
+ Data_Get_Struct(self, Info, info);
1236
+ #if defined(HAVE_SETIMAGEOPTION)
1237
+
1238
+ page = GetImageOption(info, "page");
1239
+ #else
1240
+ page = (const char *)info->page;
1241
+ #endif
1242
+ return page ? rb_str_new2(page) : Qnil;
1243
+
1244
+ }
899
1245
 
900
1246
  /*
901
1247
  Method: Info#page=<aString> or <aGeometry>
@@ -916,7 +1262,7 @@ Info_page_eq(VALUE self, VALUE page_arg)
916
1262
  return self;
917
1263
  }
918
1264
  geom_str = rb_funcall(page_arg, ID_to_s, 0);
919
- geometry=PostscriptGeometry(STRING_PTR(geom_str));
1265
+ geometry=GetPageGeometry(STRING_PTR(geom_str));
920
1266
  if (*geometry == '\0')
921
1267
  {
922
1268
  magick_free(info->page);
@@ -924,6 +1270,9 @@ Info_page_eq(VALUE self, VALUE page_arg)
924
1270
  return self;
925
1271
  }
926
1272
  magick_clone_string(&info->page, geometry);
1273
+ #if defined(HAVE_SETIMAGEOPTION)
1274
+ (void) SetImageOption(info, "page", STRING_PTR(geom_str));
1275
+ #endif
927
1276
 
928
1277
  return self;
929
1278
  }
@@ -1319,3 +1668,60 @@ Info_initialize(VALUE self)
1319
1668
  }
1320
1669
  return self;
1321
1670
  }
1671
+
1672
+
1673
+ /*
1674
+ Method: Info#get_option
1675
+ Purpose: Return the value of the specified option
1676
+ */
1677
+ static VALUE
1678
+ get_option(VALUE self, char *key)
1679
+ {
1680
+ #if defined(HAVE_SETIMAGEOPTION)
1681
+ Info *info;
1682
+ const char *value;
1683
+
1684
+ Data_Get_Struct(self, Info, info);
1685
+
1686
+ value = GetImageOption(info, key);
1687
+ if (value)
1688
+ {
1689
+ return rb_str_new2(value);
1690
+ }
1691
+ return Qnil;
1692
+ #else
1693
+ rm_not_implemented();
1694
+ return (VALUE)0;
1695
+ #endif
1696
+ }
1697
+
1698
+ /*
1699
+ Method: Info#set_option
1700
+ Purpose: Set the specified option to this value.
1701
+ If the value is nil just unset any current value
1702
+ */
1703
+ static VALUE
1704
+ set_option(VALUE self, char *key, VALUE string)
1705
+ {
1706
+ #if defined(HAVE_SETIMAGEOPTION)
1707
+ Info *info;
1708
+ char *value;
1709
+
1710
+ Data_Get_Struct(self, Info, info);
1711
+
1712
+ if (NIL_P(string))
1713
+ {
1714
+ (void) RemoveImageOption(info, key);
1715
+ }
1716
+ else
1717
+ {
1718
+ value = STRING_PTR(string);
1719
+ (void) SetImageOption(info, key, value);
1720
+ }
1721
+ return self;
1722
+ #else
1723
+ rm_not_implemented();
1724
+ return (VALUE)0;
1725
+ #endif
1726
+ }
1727
+
@@ -1,4 +1,4 @@
1
- /* $Id: rmmain.c,v 1.87 2005/06/10 22:41:19 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.89 2005/06/12 21:07:56 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2005 by Timothy P. Hunter
4
4
  | Name: rmmain.c
@@ -937,17 +937,23 @@ Init_RMagick(void)
937
937
  DCL_ATTR_ACCESSOR(Info, background_color)
938
938
  DCL_ATTR_ACCESSOR(Info, border_color)
939
939
  DCL_ATTR_ACCESSOR(Info, colorspace)
940
+ DCL_ATTR_ACCESSOR(Info, comment) // new in 6.0.0
940
941
  DCL_ATTR_ACCESSOR(Info, compression)
942
+ DCL_ATTR_ACCESSOR(Info, delay) // new in 6.0.0
941
943
  DCL_ATTR_ACCESSOR(Info, density)
942
944
  DCL_ATTR_ACCESSOR(Info, depth)
945
+ DCL_ATTR_ACCESSOR(Info, dispose) // new in 6.0.0
943
946
  DCL_ATTR_ACCESSOR(Info, dither)
944
947
  DCL_ATTR_ACCESSOR(Info, extract) // new in 5.5.6, replaces tile
945
948
  DCL_ATTR_ACCESSOR(Info, filename)
949
+ DCL_ATTR_ACCESSOR(Info, fill)
946
950
  DCL_ATTR_ACCESSOR(Info, font)
947
951
  DCL_ATTR_ACCESSOR(Info, format)
948
952
  DCL_ATTR_ACCESSOR(Info, fuzz)
953
+ DCL_ATTR_ACCESSOR(Info, gravity)
949
954
  DCL_ATTR_ACCESSOR(Info, group)
950
955
  DCL_ATTR_ACCESSOR(Info, interlace)
956
+ DCL_ATTR_ACCESSOR(Info, label) // new in 6.0.0
951
957
  DCL_ATTR_ACCESSOR(Info, matte_color)
952
958
  DCL_ATTR_ACCESSOR(Info, monochrome)
953
959
  DCL_ATTR_ACCESSOR(Info, number_scenes) // new in 5.5.6, replaces subrange
@@ -1252,6 +1258,13 @@ Init_RMagick(void)
1252
1258
 
1253
1259
  // GravityType constants
1254
1260
  DEF_ENUM(GravityType)
1261
+ #if defined(HAVE_UNDEFINEDGRAVITY)
1262
+ ENUMERATOR(UndefinedGravity)
1263
+ #else
1264
+ // Provide this enumerator in older (pre 6.0.0) versions of ImageMagick
1265
+ _enum = rm_enum_new(_cls, ID2SYM(rb_intern("UndefinedGravity")), INT2FIX(0));\
1266
+ rb_define_const(Module_Magick, "UndefinedGravity", _enum);
1267
+ #endif
1255
1268
  ENUMERATOR(ForgetGravity)
1256
1269
  ENUMERATOR(NorthWestGravity)
1257
1270
  ENUMERATOR(NorthGravity)
@@ -1518,7 +1531,7 @@ static void version_constants(void)
1518
1531
 
1519
1532
  rb_define_const(Module_Magick, "Version", rb_str_new2(PACKAGE_STRING));
1520
1533
  sprintf(long_version,
1521
- "This is %s ($Date: 2005/06/10 22:41:19 $) Copyright (C) 2005 by Timothy P. Hunter\n"
1534
+ "This is %s ($Date: 2005/06/12 21:07:56 $) Copyright (C) 2005 by Timothy P. Hunter\n"
1522
1535
  "Built with %s\n"
1523
1536
  "Built for %s\n"
1524
1537
  "Web page: http://rmagick.rubyforge.org\n"
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{rmagick}
4
- s.version = "1.8.2"
4
+ s.version = "1.8.3"
5
5
  s.date = Date.today.to_s
6
6
  s.summary = %q{RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries.}
7
7
  s.description =<<DESCRIPTION
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.3
3
3
  specification_version: 1
4
4
  name: rmagick
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.8.2
7
- date: 2005-06-10
6
+ version: 1.8.3
7
+ date: 2005-06-17
8
8
  summary: RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries.
9
9
  require_paths:
10
10
  - lib