rmagick 1.10.0 → 1.10.1

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,11 @@
1
+ RMagick 1.10.1
2
+ o Fix bug #3437, memory leak in ImageList#to_blob
3
+ o Fix bug #3363, Image#composite doesn't work when the source image
4
+ is bigger than the destination
5
+ o Fix bug #3635, Image#import_pixels doesn't accept FloatPixel or DoublePixel
6
+ storage types
7
+ o Feature #3597, add border_color attribute to the Draw class
8
+
1
9
  RMagick 1.10.0
2
10
  o Added add_noise_channel method to Image class (available with ImageMagick 6.2.5)
3
11
  o Added vignette method to the Image class (available with ImageMagick 6.2.6)
@@ -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.10.0 README</title>
4
+ <title>RMagick 1.10.1 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.10.0 README</h1>
9
+ <h1>RMagick 1.10.1 README</h1>
10
10
 
11
- <h2>01/21/06</h2>
11
+ <h2>02/25/06</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;&#x61;&#105;&#x6C;&#116;&#111;:&#x72;&#x6D;&#097;&#103;&#105;&#099;&#107;&#064;&#x72;&#117;&#098;y&#102;&#111;&#x72;&#x67;&#x65;&#046;o&#114;&#x67;">&#x72;&#x6D;&#097;&#103;&#105;&#099;&#107;&#064;&#x72;&#117;&#098;y&#102;&#111;&#x72;&#x67;&#x65;&#046;o&#114;&#x67;</a></p>
45
+ <p><strong>Email:</strong> <a href="m&#x61;&#105;&#x6C;&#x74;&#x6F;:&#x72;&#x6D;&#x61;&#103;&#x69;&#x63;&#x6B;&#064;&#x72;&#x75;&#098;&#121;&#102;&#x6F;&#114;&#103;&#x65;.o&#x72;&#103;">&#x72;&#x6D;&#x61;&#103;&#x69;&#x63;&#x6B;&#064;&#x72;&#x75;&#098;&#121;&#102;&#x6F;&#114;&#103;&#x65;.o&#x72;&#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.10.0.tar.gz archive and enter the top
221
+ <p>De-compress the RMagick-1.10.1.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.10.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
242
+ <pre><code>/home/you/RMagick-1.10.1/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.10.0/ext/RMagick/RMagick.so (LoadError)
244
+ /home/you/RMagick-1.10.1/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.10.0/./post-setup.rb failed:
264
+ <pre><code>hook /home/me/src/RMagick-1.10.1/./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.10.0 README
1
+ RMagick 1.10.1 README
2
2
  ================================
3
- 01/21/06
3
+ 02/25/06
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.10.0.tar.gz archive and enter the top
191
+ De-compress the RMagick-1.10.1.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.10.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
209
+ /home/you/RMagick-1.10.1/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.10.0/ext/RMagick/RMagick.so (LoadError)
211
+ /home/you/RMagick-1.10.1/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.10.0/./post-setup.rb failed:
228
+ hook /home/me/src/RMagick-1.10.1/./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.10.0.
3
+ # Generated by GNU Autoconf 2.59 for RMagick 1.10.1.
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.10.0.tar.gz'
272
- PACKAGE_VERSION='1.10.0'
273
- PACKAGE_STRING='RMagick 1.10.0'
271
+ PACKAGE_TARNAME='RMagick-1.10.1.tar.gz'
272
+ PACKAGE_VERSION='1.10.1'
273
+ PACKAGE_STRING='RMagick 1.10.1'
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.10.0 to adapt to many kinds of systems.
782
+ \`configure' configures RMagick 1.10.1 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.10.0:";;
839
+ short | recursive ) echo "Configuration of RMagick 1.10.1:";;
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.10.0
984
+ RMagick configure 1.10.1
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.10.0, which was
998
+ It was created by RMagick $as_me 1.10.1, which was
999
999
  generated by GNU Autoconf 2.59. Invocation command line was
1000
1000
 
1001
1001
  $ $0 $@
@@ -4965,7 +4965,8 @@ fi
4965
4965
 
4966
4966
 
4967
4967
 
4968
- for ac_func in GrayscalePseudoClassImage ImagesToBlob ImportImagePixels
4968
+
4969
+ for ac_func in GrayscalePseudoClassImage ImagesToBlob ImportImagePixels InterpretImageAttributes
4969
4970
  do
4970
4971
  as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4971
4972
  echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -9229,7 +9230,7 @@ _ASBOX
9229
9230
  } >&5
9230
9231
  cat >&5 <<_CSEOF
9231
9232
 
9232
- This file was extended by RMagick $as_me 1.10.0, which was
9233
+ This file was extended by RMagick $as_me 1.10.1, which was
9233
9234
  generated by GNU Autoconf 2.59. Invocation command line was
9234
9235
 
9235
9236
  CONFIG_FILES = $CONFIG_FILES
@@ -9289,7 +9290,7 @@ _ACEOF
9289
9290
 
9290
9291
  cat >>$CONFIG_STATUS <<_ACEOF
9291
9292
  ac_cs_version="\\
9292
- RMagick config.status 1.10.0
9293
+ RMagick config.status 1.10.1
9293
9294
  configured by $0, generated by GNU Autoconf 2.59,
9294
9295
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9295
9296
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  # RMagick configure.ac
3
3
 
4
- AC_INIT(RMagick, 1.10.0, rmagick@rubyforge.org, RMagick-1.10.0.tar.gz)
4
+ AC_INIT(RMagick, 1.10.1, rmagick@rubyforge.org, RMagick-1.10.1.tar.gz)
5
5
  echo "Configuring ${PACKAGE_STRING}"
6
6
 
7
7
  AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
@@ -144,7 +144,7 @@ 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])
147
+ AC_CHECK_FUNCS([GrayscalePseudoClassImage ImagesToBlob ImportImagePixels InterpretImageAttributes])
148
148
  AC_CHECK_FUNCS([IsColorSimilar NegateImageChannel NormalizeImageChannel])
149
149
  AC_CHECK_FUNCS([ParseSizeGeometry PosterizeImage PreviewImage QuantumOperatorRegionImage])
150
150
  AC_CHECK_FUNCS([RadialBlurImage RandomChannelThresholdImage RandomThresholdImageChannel])
@@ -152,7 +152,7 @@
152
152
 
153
153
  <dd>An extended form of the <code>Version</code> constant with
154
154
  the format shown here:<br />
155
- <code>This is RMagick 1.10.0 ($Date: 2006/01/21 15:27:19 $)
155
+ <code>This is RMagick 1.10.0 ($Date: 2006/01/28 23:40:31 $)
156
156
  Copyright (C) 2006 by Timothy P. Hunter<br />
157
157
  Built with GraphicsMagick 1.2 unreleased Q16
158
158
  http://www.GraphicsMagick.org/<br />
@@ -545,7 +545,7 @@ ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
545
545
 
546
546
  <dd class="imquote">The resulting image is image replaced with
547
547
  composite image. Here the matte information is ignored.
548
- Available in ImageMagick 6.0.0.</dd>
548
+ </dd>
549
549
 
550
550
  <dt>CopyCompositeOp</dt>
551
551
 
@@ -582,7 +582,7 @@ ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
582
582
 
583
583
  <dt>DissolveCompositeOp</dt>
584
584
 
585
- <dd> </dd>
585
+ <dd>&nbsp;</dd>
586
586
 
587
587
  <dt>DisplaceCompositeOp</dt>
588
588
 
@@ -593,15 +593,15 @@ ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
593
593
 
594
594
  <dt>ModulateCompositeOp</dt>
595
595
 
596
- <dd> </dd>
596
+ <dd>&nbsp;</dd>
597
597
 
598
598
  <dt>ThresholdCompositeOp</dt>
599
599
 
600
- <dd> </dd>
600
+ <dd>&nbsp;</dd>
601
601
 
602
602
  <dt>NoCompositeOp</dt>
603
603
 
604
- <dd> </dd>
604
+ <dd>&nbsp;</dd>
605
605
 
606
606
  <dt>DarkenCompositeOp</dt>
607
607
 
@@ -646,83 +646,83 @@ ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
646
646
 
647
647
  <dt>OverlayCompositeOp</dt>
648
648
 
649
- <dd> </dd>
649
+ <dd>&nbsp;</dd>
650
650
 
651
651
  <dt>CopyCyanCompositeOp</dt>
652
652
 
653
653
  <dd>Copy the cyan channel from the composite image to the
654
- target image. Available in ImageMagick 5.5.7.</dd>
654
+ target image. </dd>
655
655
 
656
656
  <dt>CopyMagentaCompositeOp</dt>
657
657
 
658
658
  <dd>Copy the magenta channel from the composite image to the
659
- target image. Available in ImageMagick 5.5.7.</dd>
659
+ target image. </dd>
660
660
 
661
661
  <dt>CopyYellowCompositeOp</dt>
662
662
 
663
663
  <dd>Copy the yellow channel from the composite image to the
664
- target image. Available in ImageMagick 5.5.7.</dd>
664
+ target image. </dd>
665
665
 
666
666
  <dt>CopyBlackCompositeOp</dt>
667
667
 
668
668
  <dd>Copy the black channel from the composite image to the
669
- target image. Available in ImageMagick 5.5.7.</dd>
669
+ target image. </dd>
670
670
 
671
671
  <dt>DstAtopCompositeOp</dt>
672
672
 
673
- <dd>Available in ImageMagick 6.0.0</dd>
673
+ <dd>&nbsp;</dd>
674
674
 
675
675
  <dt>DstCompositeOp</dt>
676
676
 
677
- <dd>Available in ImageMagick 6.0.0</dd>
677
+ <dd>&nbsp;</dd>
678
678
 
679
679
  <dt>DstInCompositeOp</dt>
680
680
 
681
- <dd>Available in ImageMagick 6.0.0</dd>
681
+ <dd>&nbsp;</dd>
682
682
 
683
683
  <dt>DstOutCompositeOp</dt>
684
684
 
685
- <dd>Available in ImageMagick 6.0.0</dd>
685
+ <dd>&nbsp;</dd>
686
686
 
687
687
  <dt>DstOverCompositeOp</dt>
688
688
 
689
- <dd>Available in ImageMagick 6.0.0</dd>
689
+ <dd>&nbsp;</dd>
690
690
 
691
691
  <dt>SrcAtopCompositeOp</dt>
692
692
 
693
- <dd>Available in ImageMagick 6.0.0</dd>
693
+ <dd>&nbsp;</dd>
694
694
 
695
695
  <dt>SrcCompositeOp</dt>
696
696
 
697
- <dd>Available in ImageMagick 6.0.0</dd>
697
+ <dd>&nbsp;</dd>
698
698
 
699
699
  <dt>SrcInCompositeOp</dt>
700
700
 
701
- <dd>Available in ImageMagick 6.0.0</dd>
701
+ <dd>&nbsp;</dd>
702
702
 
703
703
  <dt>SrcOutCompositeOp</dt>
704
704
 
705
- <dd>Available in ImageMagick 6.0.0</dd>
705
+ <dd>&nbsp;</dd>
706
706
 
707
707
  <dt>SrcOverCompositeOp</dt>
708
708
 
709
- <dd>Available in ImageMagick 6.0.0</dd>
709
+ <dd>&nbsp;</dd>
710
710
 
711
711
  <dt>ColorDodgeCompositeOp</dt>
712
712
 
713
- <dd>Available in ImageMagick 6.0.0</dd>
713
+ <dd class="imquote">Brightens the destination color to reflect the source color. Painting with black produces no change.</dd>
714
714
 
715
715
  <dt>ExclusionCompositeOp</dt>
716
716
 
717
- <dd>Available in ImageMagick 6.0.0</dd>
717
+ <dd>&nbsp;</dd>
718
718
 
719
719
  <dt>HardLightCompositeOp</dt>
720
720
 
721
- <dd>Available in ImageMagick 6.0.0</dd>
721
+ <dd class="imquote">Multiplies or screens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened as if it were screened. If the source color is darker than 0.5, the destination is darkened, as if it were multiplied. The degree of lightening or darkening is proportional to the difference between the source color and 0.5. If it is equal to 0.5 the destination is unchanged. Painting with pure black or white produces black or white.</dd>
722
722
 
723
723
  <dt>SoftLightCompositeOp</dt>
724
724
 
725
- <dd>Available in ImageMagick 6.0.0</dd>
725
+ <dd class="imquote">Darkens or lightens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened. If the source color is darker than 0.5, the destination is darkened, as if it were burned in. The degree of darkening or lightening is proportional to the difference between the source color and 0.5. If it is equal to 0.5, the destination is unchanged. Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white.</dd>
726
726
  </dl>
727
727
 
728
728
  <h3 class="const" id="CompressionType">CompressionType</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 December 2004), see www.w3.org" />
8
8
 
9
9
  <title>RMagick: class Draw</title>
10
10
  <meta http-equiv="Content-Type" content=
@@ -1135,7 +1135,10 @@ draw.inspect &raquo;
1135
1135
  <h4>Arguments</h4>
1136
1136
 
1137
1137
  <p>A <a href="constants.html#PaintMethod">PaintMethod</a>
1138
- constant.</p>
1138
+ constant. If you use the <code>FillToBorderMethod</code>,
1139
+ assign the border color with the
1140
+ <code>Draw#border_color=</code> attribute before calling
1141
+ <a href="#draw">draw</a>.</p>
1139
1142
 
1140
1143
  <h4>Returns</h4>
1141
1144
 
@@ -1143,8 +1146,13 @@ draw.inspect &raquo;
1143
1146
 
1144
1147
  <h4>Example</h4>
1145
1148
  <pre>
1146
- draw.color(x, y, Magick::ReplaceMethod)
1149
+ draw.border_color = 'black'
1150
+ draw.color(x, y, Magick::FillToBorderMethod)
1147
1151
  </pre>
1152
+
1153
+ <h4>See Also</h4>
1154
+
1155
+ <p><a href="#matte">matte</a></p>
1148
1156
  </div>
1149
1157
 
1150
1158
  <div class="sig">
@@ -1686,7 +1694,9 @@ draw.decorate(Magick::LineThroughDecoration)
1686
1694
 
1687
1695
  <dd>Make all the pixels surrounding the pixel at
1688
1696
  <em>(x,y)</em> transparent, until encountering pixels
1689
- that match the border color.</dd>
1697
+ that match the border color. Assign the border color with
1698
+ the <code>Draw#border_color=</code> attribute before
1699
+ calling <a href="#draw">draw</a>.</dd>
1690
1700
 
1691
1701
  <dt>ResetMethod</dt>
1692
1702
 
@@ -1699,7 +1709,7 @@ draw.decorate(Magick::LineThroughDecoration)
1699
1709
 
1700
1710
  <p>self</p>
1701
1711
 
1702
- <h4>See also</h4><a href=
1712
+ <h4>See also</h4><a href="#color">color</a><a href=
1703
1713
  "image2.html#matte_point">matte_point</a>, <a href=
1704
1714
  "image2.html#matte_replace">matte_replace</a>, <a href=
1705
1715
  "image2.html#matte_floodfill">matte_floodfill</a>, <a href=
@@ -349,23 +349,51 @@
349
349
 
350
350
  <p>ProfileImage</p>
351
351
 
352
- <h4>Note</h4>
352
+ <h4>Notes</h4>
353
353
 
354
- <p>&times;Magick does not automatically remove profiles when
355
- resizing images. If you are trying to make your JPEG thumbnail
356
- images as small as possible, use <code>profile!</code> to
357
- remove any profiles from the image as well. Also see <a href=
358
- "#strip_bang">strip!</a></p>
354
+ <ol>
355
+ <li>To extract a profile from an image, simply convert the
356
+ image, specifying the profile name (APP1, 8BIM, ICM, IPTC,
357
+ etc.) as the format of the output image. There are at least
358
+ two ways to do this.
359
+
360
+ <ol style="list-style-type: lower-alpha">
361
+ <li>Write the image to a file using the profile name as
362
+ the filename extension ("myimage.app1", for example).
363
+ <pre>
364
+ img.write("myimage.app1")
365
+ </pre>
366
+ </li>
367
+
368
+ <li>To capture the profile information in a string,
369
+ assign the profile name to the <a href=
370
+ "imageattrs.html#format">format=</a> attribute and call
371
+ <a href="image3.html#to_blob">to_blob.</a>
372
+ <pre>
373
+ img.format = 'iptc'
374
+ profile_str = img.to_blob
375
+ </pre><a href=
376
+ "http://www.imagemagick.org/script/formats.php#embedded">
377
+ This page (ImageMagick)</a> and <a href=
378
+ "http://www.graphicsmagick.org/www/formats.html">this
379
+ page (GraphicsMagick)</a> list the supported profiles.
380
+ </li>
381
+ </ol>
382
+ </li>
383
+
384
+ <li>&times;Magick does not automatically remove profiles when
385
+ resizing images. If you are trying to make your JPEG
386
+ thumbnail images as small as possible, use
387
+ <code>profile!</code> to remove any profiles from the image
388
+ as well. Also see <a href="#strip_bang">strip!</a></li>
389
+ </ol>
359
390
  </div>
360
391
 
361
392
  <div class="sig">
362
393
  <h3 id="properties">properties</h3>
363
394
 
364
395
  <p><span class="arg">image</span>.properties <span class=
365
- "arg">[ {|name,value| block} ]</span> -&gt;
366
- <em>image</em><br />
367
- <span class="arg">image</span>.properties -&gt;
368
- <em>aHash</em></p>
396
+ "arg">[ {|name,value| block} ]</span> -&gt; <em>aHash</em></p>
369
397
  </div>
370
398
 
371
399
  <div class="desc">
@@ -786,9 +814,6 @@ random_threshold_channel(geom, RedChannel)
786
814
 
787
815
  <p><span class="arg">image</span>.resize(<span class=
788
816
  "arg">new_width</span>, <span class="arg">new_height</span>,
789
- <span class="arg">filter</span>=<a href=
790
- "constants.html#FilterType">LanczosFilter</a>, <span class=
791
- "arg">blur</span>=1.0) -&gt; <em>anImage</em><br />
792
817
  <span class="arg">image</span>.resize(<span class=
793
818
  "arg">scale_factor</span>) -&gt; <em>anImage</em></p>
794
819
  </div>
@@ -1168,8 +1193,8 @@ random_threshold_channel(geom, RedChannel)
1168
1193
 
1169
1194
  <dd>A <a href=
1170
1195
  "constants.html#ColorspaceType"><code>ColorspaceType</code></a>
1171
- value. <span class="imquote">Empirical evidence suggests
1172
- that distances in YUV or YIQ correspond to perceptual color
1196
+ value. <span class="imquote">Empirical evidence suggests that
1197
+ distances in YUV or YIQ correspond to perceptual color
1173
1198
  differences more closely than do distances in RGB space. The
1174
1199
  image is then returned to RGB colorspace after color
1175
1200
  reduction.</span></dd>
@@ -1638,7 +1663,7 @@ random_threshold_channel(geom, RedChannel)
1638
1663
  <img id="sheared" onmouseover=
1639
1664
  "this.style.display='none'; noshear.style.display='';" src=
1640
1665
  "ex/shear.jpg" alt="shear example"
1641
- /></a><img src="ex/images/spin.gif" alt="" class=
1666
+ /></a><img src="ex/images/spin.gif" alt="" class=
1642
1667
  "spin" style="left: 253px; top: 34px" title=
1643
1668
  "Mouse over the example to see the original image" /></p>
1644
1669
 
@@ -2949,7 +2974,7 @@ end
2949
2974
  "arg">radius</span> is 0 then &times;Magick will choose a
2950
2975
  suitable value. <span class="arg">Sigma</span> must be
2951
2976
  non-zero. Choose a very small value for <span class=
2952
- "arg">sigma</span> to produce a "hard" edge.</dd>
2977
+ "arg">sigma</span> to produce a "hard" edge.</dd>
2953
2978
  </dl>
2954
2979
 
2955
2980
  <h4>Returns</h4>
@@ -113,8 +113,6 @@
113
113
 
114
114
  <li><a href="#interlace">interlace</a></li>
115
115
 
116
- <li><a href="#iptc_profile">iptc_profile</a></li>
117
-
118
116
  <li><a href="#matte">matte</a></li>
119
117
 
120
118
  <li><a href=
@@ -125,14 +123,14 @@
125
123
  <li><a href="#monitor">monitor</a></li>
126
124
 
127
125
  <li><a href="#montage">montage</a></li>
126
+
127
+ <li><a href=
128
+ "#normalized_mean_error">normalized_mean_error</a></li>
128
129
  </ul>
129
130
  </div>
130
131
 
131
132
  <div class="toccol">
132
133
  <ul>
133
- <li><a href=
134
- "#normalized_mean_error">normalized_mean_error</a></li>
135
-
136
134
  <li><a href=
137
135
  "#normalized_maximum_error">normalized_maximum_error</a></li>
138
136
 
@@ -907,34 +905,6 @@
907
905
  constant.</p>
908
906
  </div>
909
907
 
910
- <div class="sig">
911
- <h3 id="iptc_profile">iptc_profile</h3>
912
-
913
- <p><span class="arg">image.</span>iptc_profile -&gt;
914
- <em>aString</em><br />
915
- <span class="arg">image.</span>iptc_profile = <span class=
916
- "arg">aString</span> or <span class=
917
- "arg"><code>nil</code></span></p>
918
- </div>
919
-
920
- <div class="desc">
921
- <h4>Description</h4>
922
-
923
- <p class="imquote">IPTC profile. Specifications are available
924
- from the <a href="http://www.iptc.org">International Press
925
- Telecommunications Council</a> for IPTC profiles.</p>
926
-
927
- <h4>Arguments</h4>
928
-
929
- <p>To remove an existing profile, assign <code>nil</code> to
930
- the attribute.</p>
931
-
932
- <h4>Returns</h4>
933
-
934
- <p>The current profile, or <code>nil</code> if the image has no
935
- IPTC profile.</p>
936
- </div>
937
-
938
908
  <div class="sig">
939
909
  <h3 id="matte">matte</h3>
940
910
 
@@ -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: ImageMagick/GraphicsMagick Conventions</title>
10
10
  <meta http-equiv="Content-Type" content=
@@ -133,13 +133,13 @@
133
133
  "http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color
134
134
  name</a> (similar to the X color names), or</li>
135
135
 
136
- <li>a hex digit string in one of the formats shown in the
137
- following table.</li>
136
+ <li>a string in one of the formats shown in the following
137
+ table.</li>
138
138
  </ol>
139
139
 
140
- <table id="rgbfmts" summary="RGB formats">
140
+ <table id="rgbfmts" summary="color name formats">
141
141
  <caption>
142
- RGB color name formats
142
+ Color name formats
143
143
  </caption>
144
144
 
145
145
  <tr class="oddrow">
@@ -190,11 +190,24 @@
190
190
  <td>16 bits for each channel, plus the alpha channel</td>
191
191
  </tr>
192
192
 
193
+ <tr class="oddrow">
194
+ <td>cmyk(c,m,y,k)</td>
195
+
196
+ <td>CMYK functional notation. c, m, y, and k are either 4
197
+ integers 0-MaxRGB or 4 percentages 0%-100%.</td>
198
+ </tr>
199
+
200
+ <tr class="evenrow">
201
+ <td>cmyka(c,m,y,a)</td>
202
+
203
+ <td>CMYK functional notation plus the alpha channel.</td>
204
+ </tr>
205
+
193
206
  <tr class="oddrow">
194
207
  <td>rgb(r,g,b)</td>
195
208
 
196
- <td>SVG functional notation. r, g, and b are either three
197
- integers 0-255 or 3 percentanges 0%-100%.</td>
209
+ <td>SVG functional notation. r, g, and b are either 3
210
+ integers 0-MaxRGB or 3 percentages 0%-100%.</td>
198
211
  </tr>
199
212
 
200
213
  <tr class="evenrow">
@@ -202,6 +215,23 @@
202
215
 
203
216
  <td>SVG functional notation plus the alpha channel.</td>
204
217
  </tr>
218
+
219
+ <tr class="oddrow">
220
+ <td>hsl(h,s,l)</td>
221
+
222
+ <td>Hue, saturation, lightness. The <em>hue</em> value (h)
223
+ should be a number in the range 0 &lt;= n &lt; 360. The
224
+ <em>saturation</em> (s) and <em>lightness</em> (l) values
225
+ should be numbers in the range 0 &lt;= n &lt;= 100.
226
+ <em>(Available in ImageMagick 6.2.6)</em></td>
227
+ </tr>
228
+
229
+ <tr class="evenrow">
230
+ <td>hsla(h,s,l,a)</td>
231
+
232
+ <td>Hue, saturation, lightness, plus the alpha channel.
233
+ <em>(Available in ImageMagick 6.2.6)</em></td>
234
+ </tr>
205
235
  </table>
206
236
 
207
237
  <p>The alpha channel is the opacity of the image, which can range
@@ -423,7 +453,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
423
453
  an image.</p>
424
454
  </div>
425
455
 
426
- <p class="spacer">&nbsp;</p>
456
+ <p class="spacer"> </p>
427
457
 
428
458
  <div class="nav">
429
459
  &laquo; <a href="usage.html">Prev</a> | <a href=
@@ -3,7 +3,7 @@
3
3
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
4
 
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
- <!-- $Id: rvgtut.html,v 1.7 2005/11/26 15:03:05 rmagick Exp $ -->
6
+ <!-- $Id: rvgtut.html,v 1.9 2006/01/28 23:40:31 rmagick Exp $ -->
7
7
 
8
8
  <head>
9
9
  <meta name="generator" content=
@@ -63,17 +63,17 @@
63
63
  </div>
64
64
  <pre class="example">
65
65
  1 require 'rvg/rvg'
66
- 2 include magick
66
+ 2 include Magick
67
67
  3
68
68
  4 RVG::dpi = 72
69
69
  5
70
- 6 rvg = rvg.new(2.5.in, 2.5.in).viewbox(0,0,250,250) do |canvas|
70
+ 6 rvg = RVG.new(2.5.in, 2.5.in).viewbox(0,0,250,250) do |canvas|
71
71
  7 canvas.background_fill = 'white'
72
72
  8
73
73
  9 canvas.g.translate(100, 150).rotate(-30) do |body|
74
74
  10 body.styles(:fill=&gt;'yellow', :stroke=&gt;'black', :stroke_width=&gt;2)
75
75
  11 body.ellipse(50, 30)
76
- 12 body.rect(45, 20, -20, -10).skewx(-35)
76
+ 12 body.rect(45, 20, -20, -10).skewX(-35)
77
77
  13 end
78
78
  14
79
79
  15 canvas.g.translate(130, 83) do |head|
@@ -83,7 +83,7 @@
83
83
  19 head.polygon(30,0, 70,5, 30,10, 62,25, 23,20).styles(:fill=&gt;'orange')
84
84
  20 end
85
85
  21
86
- 22 foot = rvg::group.new do |_foot|
86
+ 22 foot = RVG::Group.new do |_foot|
87
87
  23 _foot.path('m0,0 v30 l30,10 l5,-10, l-5,-10 l-30,10z').
88
88
  24 styles(:stroke_width=&gt;2, :fill=&gt;'orange', :stroke=&gt;'black')
89
89
  25 end
@@ -211,7 +211,7 @@
211
211
  9 canvas.g.translate(100, 150).rotate(-30) do |body|
212
212
  10 body.styles(:fill=&gt;'yellow', :stroke=&gt;'black', :stroke_width=&gt;2)
213
213
  11 body.ellipse(50, 30)
214
- 12 body.rect(45, 20, -20, -10).skewx(-35)
214
+ 12 body.rect(45, 20, -20, -10).skewX(-35)
215
215
  13 end
216
216
  </pre>
217
217
 
@@ -401,7 +401,7 @@
401
401
 
402
402
  <h2>Lines 22-25</h2>
403
403
  <pre class="example">
404
- 22 foot = rvg::group.new do |_foot|
404
+ 22 foot = RVG::Group.new do |_foot|
405
405
  23 _foot.path('m0,0 v30 l30,10 l5,-10, l-5,-10 l-30,10z').
406
406
  24 styles(:stroke_width=&gt;2, :fill=&gt;'orange', :stroke=&gt;'black')
407
407
  25 end
@@ -1,4 +1,4 @@
1
- MANIFEST for RMagick-1.10.0 - 18:09:31 01/21/06
1
+ MANIFEST for RMagick-1.10.1 - 09:54:53 02/25/06
2
2
 
3
3
  configure
4
4
  README.html
@@ -1,4 +1,4 @@
1
- /* $Id: rmagick.h,v 1.104 2006/01/11 23:53:06 rmagick Exp $ */
1
+ /* $Id: rmagick.h,v 1.105 2006/02/19 17:12:20 rmagick Exp $ */
2
2
  /*=============================================================================
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmagick.h
@@ -517,6 +517,7 @@ Pixel_##_cmyk_channel_(VALUE self) \
517
517
  // rmdraw.c
518
518
  ATTR_WRITER(Draw, affine)
519
519
  ATTR_WRITER(Draw, align)
520
+ ATTR_WRITER(Draw, border_color)
520
521
  ATTR_WRITER(Draw, decorate)
521
522
  ATTR_WRITER(Draw, density)
522
523
  ATTR_WRITER(Draw, encoding)
@@ -104,6 +104,8 @@
104
104
  #undef HAVE_IMAGE_TICKS_PER_SECOND
105
105
  /* Introduced in IM 5.5.7, GM 1.1 */
106
106
  #undef HAVE_IMPORTIMAGEPIXELS
107
+ /* Introduced in IM 6.2.6-1 */
108
+ #undef HAVE_INTERPRETIMAGEATTRIBUTES
107
109
  #undef HAVE_INTTYPES_H
108
110
  /* Introduced in IM 6.2.5 */
109
111
  #undef HAVE_ISCOLORSIMILAR
@@ -1,4 +1,4 @@
1
- /* $Id: rmdraw.c,v 1.27 2005/12/31 14:40:50 rmagick Exp $ */
1
+ /* $Id: rmdraw.c,v 1.29 2006/02/19 17:12:20 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmdraw.c
@@ -48,6 +48,21 @@ Draw_align_eq(VALUE self, VALUE align)
48
48
  return self;
49
49
  }
50
50
 
51
+ /*
52
+ Method: Draw#border_color=
53
+ Purpose: border_color attribute writer
54
+ */
55
+ VALUE
56
+ Draw_border_color_eq(VALUE self, VALUE border_color)
57
+ {
58
+ Draw *draw;
59
+
60
+ rm_check_frozen(self);
61
+ Data_Get_Struct(self, Draw, draw);
62
+ Color_to_PixelPacket(&draw->info->border_color, border_color);
63
+ return self;
64
+ }
65
+
51
66
  /*
52
67
  Method: Draw#decorate=
53
68
  Purpose: decorate attribute writer
@@ -413,7 +428,11 @@ VALUE Draw_annotate(
413
428
  Data_Get_Struct(ImageList_cur_image(image_arg), Image, image);
414
429
 
415
430
  // Translate & store in Draw structure
431
+ #if defined(HAVE_INTERPRETIMAGEATTRIBUTES)
432
+ draw->info->text = InterpretImageAttributes(NULL, image, STRING_PTR(text));
433
+ #else
416
434
  draw->info->text = TranslateText(NULL, image, STRING_PTR(text));
435
+ #endif
417
436
  if (!draw->info->text)
418
437
  {
419
438
  rb_raise(rb_eArgError, "no text");
@@ -1252,7 +1271,7 @@ get_type_metrics(
1252
1271
  VALUE self,
1253
1272
  get_type_metrics_func_t *getter)
1254
1273
  {
1255
- static char attrs[] = "bcdefghiklmnopqrstuwxyz";
1274
+ static char attrs[] = "OPbcdefghiklmnopqrstuwxyz[@#%";
1256
1275
  #define ATTRS_L (sizeof(attrs)-1)
1257
1276
  Image *image;
1258
1277
  Draw *draw;
@@ -1304,7 +1323,11 @@ get_type_metrics(
1304
1323
  }
1305
1324
 
1306
1325
  Data_Get_Struct(self, Draw, draw);
1326
+ #if defined(HAVE_INTERPRETIMAGEATTRIBUTES)
1327
+ draw->info->text = InterpretImageAttributes(NULL, image, text);
1328
+ #else
1307
1329
  draw->info->text = TranslateText(NULL, image, text);
1330
+ #endif
1308
1331
  if (!draw->info->text)
1309
1332
  {
1310
1333
  rb_raise(rb_eArgError, "no text to measure");
@@ -1,4 +1,4 @@
1
- /* $Id: rmilist.c,v 1.30 2006/01/06 23:55:53 rmagick Exp $ */
1
+ /* $Id: rmilist.c,v 1.31 2006/02/03 23:26:05 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmilist.c
@@ -529,6 +529,7 @@ ImageList_to_blob(VALUE self)
529
529
  Image *images;
530
530
  Info *info;
531
531
  volatile VALUE info_obj;
532
+ volatile VALUE blob_str;
532
533
  void *blob = NULL;
533
534
  size_t length = 0;
534
535
  ExceptionInfo exception;
@@ -564,7 +565,15 @@ ImageList_to_blob(VALUE self)
564
565
  rm_split(images);
565
566
  HANDLE_ERROR
566
567
 
567
- return (blob && length) ? rb_str_new(blob, length) : Qnil;
568
+ if (length == 0 || !blob)
569
+ {
570
+ return Qnil;
571
+ }
572
+
573
+ blob_str = rb_str_new(blob, length);
574
+ magick_free((void*)blob);
575
+
576
+ return blob_str;
568
577
  }
569
578
 
570
579
 
@@ -1,4 +1,4 @@
1
- /* $Id: rmimage.c,v 1.139 2006/01/18 00:22:33 rmagick Exp $ */
1
+ /* $Id: rmimage.c,v 1.142 2006/02/24 00:15:03 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmimage.c
@@ -1267,7 +1267,7 @@ Image_color_profile(VALUE self)
1267
1267
 
1268
1268
  Data_Get_Struct(self, Image, image);
1269
1269
 
1270
- str_info = GetImageProfile(image, "icc");
1270
+ str_info = (StringInfo *)GetImageProfile(image, "icc");
1271
1271
  if (!str_info)
1272
1272
  {
1273
1273
  profile = Qnil;
@@ -1814,8 +1814,8 @@ static VALUE composite(
1814
1814
  GravityType gravity;
1815
1815
  MagickEnum *magick_enum;
1816
1816
  ExceptionInfo exception;
1817
- long x_offset;
1818
- long y_offset;
1817
+ signed long x_offset;
1818
+ signed long y_offset;
1819
1819
 
1820
1820
  Data_Get_Struct(self, Image, image);
1821
1821
 
@@ -1835,38 +1835,38 @@ static VALUE composite(
1835
1835
  y_offset = 0;
1836
1836
  break;
1837
1837
  case NorthGravity:
1838
- x_offset = (image->columns - comp_image->columns) / 2;
1838
+ x_offset = ((long)(image->columns) - (long)(comp_image->columns)) / 2;
1839
1839
  y_offset = 0;
1840
1840
  break;
1841
1841
  case NorthEastGravity:
1842
- x_offset = image->columns - comp_image->columns;
1842
+ x_offset = (long)(image->columns) - (long)(comp_image->columns);
1843
1843
  y_offset = 0;
1844
1844
  break;
1845
1845
  case WestGravity:
1846
1846
  x_offset = 0;
1847
- y_offset = (image->rows - comp_image->rows) / 2;
1847
+ y_offset = ((long)(image->rows) - (long)(comp_image->rows)) / 2;
1848
1848
  break;
1849
1849
  case StaticGravity:
1850
1850
  case CenterGravity:
1851
1851
  default:
1852
- x_offset = (image->columns - comp_image->columns) / 2;
1853
- y_offset = (image->rows - comp_image->rows) / 2;
1852
+ x_offset = ((long)(image->columns) - (long)(comp_image->columns)) / 2;
1853
+ y_offset = ((long)(image->rows) - (long)(comp_image->rows)) / 2;
1854
1854
  break;
1855
1855
  case EastGravity:
1856
- x_offset = image->columns - comp_image->columns;
1857
- y_offset = (image->rows - comp_image->rows) / 2;
1856
+ x_offset = (long)(image->columns) - (long)(comp_image->columns);
1857
+ y_offset = ((long)(image->rows) - (long)(comp_image->rows)) / 2;
1858
1858
  break;
1859
1859
  case SouthWestGravity:
1860
1860
  x_offset = 0;
1861
- y_offset = image->rows - comp_image->rows;
1861
+ y_offset = (long)(image->rows) - (long)(comp_image->rows);
1862
1862
  break;
1863
1863
  case SouthGravity:
1864
- x_offset = (image->columns - comp_image->columns) / 2;
1865
- y_offset = image->rows - comp_image->rows;
1864
+ x_offset = ((long)(image->columns) - (long)(comp_image->columns)) / 2;
1865
+ y_offset = (long)(image->rows) - (long)(comp_image->rows);
1866
1866
  break;
1867
1867
  case SouthEastGravity:
1868
- x_offset = image->columns - comp_image->columns;
1869
- y_offset = image->rows - comp_image->rows;
1868
+ x_offset = (long)(image->columns) - (long)(comp_image->columns);
1869
+ y_offset = (long)(image->rows) - (long)(comp_image->rows);
1870
1870
  break;
1871
1871
  }
1872
1872
  break;
@@ -1890,15 +1890,15 @@ static VALUE composite(
1890
1890
  {
1891
1891
  case NorthEastGravity:
1892
1892
  case EastGravity:
1893
- x_offset = image->columns - comp_image->columns - x_offset;
1893
+ x_offset = (long)(image->columns) - (long)(comp_image->columns) - x_offset;
1894
1894
  break;
1895
1895
  case SouthWestGravity:
1896
1896
  case SouthGravity:
1897
- y_offset = image->rows - comp_image->rows - y_offset;
1897
+ y_offset = (long)(image->rows) - (long)(comp_image->rows) - y_offset;
1898
1898
  break;
1899
1899
  case SouthEastGravity:
1900
- x_offset = image->columns - comp_image->columns - x_offset;
1901
- y_offset = image->rows - comp_image->rows - y_offset;
1900
+ x_offset = (long)(image->columns) - (long)(comp_image->columns) - x_offset;
1901
+ y_offset = (long)(image->rows) - (long)(comp_image->rows) - y_offset;
1902
1902
  break;
1903
1903
  default:
1904
1904
  Data_Get_Struct(argv[1], MagickEnum, magick_enum);
@@ -1912,16 +1912,6 @@ static VALUE composite(
1912
1912
  break;
1913
1913
  }
1914
1914
 
1915
- // CompositeImage doesn't react well to negative offsets!
1916
- if (x_offset < 0)
1917
- {
1918
- x_offset = 0;
1919
- }
1920
- if (y_offset < 0)
1921
- {
1922
- y_offset = 0;
1923
- }
1924
-
1925
1915
  if (bang)
1926
1916
  {
1927
1917
  rm_check_frozen(self);
@@ -2570,7 +2560,7 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
2570
2560
  union
2571
2561
  {
2572
2562
  volatile Quantum *i;
2573
- volatile float *f;
2563
+ volatile double *f;
2574
2564
  volatile void *v;
2575
2565
  } pixels;
2576
2566
 
@@ -2586,13 +2576,13 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
2586
2576
  map = STRING_PTR_LEN(argv[4], mapL);
2587
2577
  if (argc == 6)
2588
2578
  {
2589
- stg_type = RTEST(argv[5]) ? FloatPixel : FIX_STG_TYPE;
2579
+ stg_type = RTEST(argv[5]) ? DoublePixel : FIX_STG_TYPE;
2590
2580
  }
2591
2581
 
2592
2582
  // Compute the size of the pixel array and allocate the memory.
2593
2583
  npixels = columns * rows * mapL;
2594
2584
  pixels.v = stg_type == FIX_STG_TYPE ? (void *) ALLOC_N(Quantum, npixels)
2595
- : (void *) ALLOC_N(float, npixels);
2585
+ : (void *) ALLOC_N(double, npixels);
2596
2586
 
2597
2587
  // Create the Ruby array for the pixels. Return this even if DispatchImage fails.
2598
2588
  pixels_ary = rb_ary_new();
@@ -2627,9 +2617,7 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
2627
2617
  {
2628
2618
  for (n = 0; n < npixels; n++)
2629
2619
  {
2630
- // The ImageMagick doc for DispatchImage says that the returned pixel data
2631
- // is normalized, but it isn't, so we have to normalize it here.
2632
- rb_ary_push(pixels_ary, rb_float_new((double)pixels.f[n]/((double)MaxRGB)));
2620
+ rb_ary_push(pixels_ary, rb_float_new((double)pixels.f[n]));
2633
2621
  }
2634
2622
  }
2635
2623
 
@@ -2826,7 +2814,7 @@ Image_each_profile(VALUE self)
2826
2814
  {
2827
2815
  rb_ary_store(ary, 0, rb_str_new2(name));
2828
2816
 
2829
- str_info = GetImageProfile(image, name);
2817
+ str_info = (StringInfo *)GetImageProfile(image, name);
2830
2818
  if (str_info)
2831
2819
  {
2832
2820
  str = StringInfoToString(str_info);
@@ -3935,6 +3923,7 @@ Image_import_pixels(int argc, VALUE *argv, VALUE self)
3935
3923
  StorageType stg_type = CharPixel;
3936
3924
  size_t type_sz, map_l;
3937
3925
  volatile int *pixels = NULL;
3926
+ volatile double *fpixels = NULL;
3938
3927
  volatile void *buffer;
3939
3928
  unsigned int okay;
3940
3929
 
@@ -3986,6 +3975,12 @@ Image_import_pixels(int argc, VALUE *argv, VALUE self)
3986
3975
  case LongPixel:
3987
3976
  type_sz = sizeof(unsigned long);
3988
3977
  break;
3978
+ case DoublePixel:
3979
+ type_sz = sizeof(double);
3980
+ break;
3981
+ case FloatPixel:
3982
+ type_sz = sizeof(float);
3983
+ break;
3989
3984
  #if defined(HAVE_QUANTUMPIXEL)
3990
3985
  case QuantumPixel:
3991
3986
  type_sz = sizeof(Quantum);
@@ -4004,7 +3999,7 @@ Image_import_pixels(int argc, VALUE *argv, VALUE self)
4004
3999
  {
4005
4000
  rb_raise(rb_eArgError, "pixel buffer must contain an exact multiple of the map length");
4006
4001
  }
4007
- if (buffer_l/type_sz < npixels)
4002
+ if (buffer_l / type_sz < npixels)
4008
4003
  {
4009
4004
  rb_raise(rb_eArgError, "pixel buffer too small (need %lu channel values, got %ld)"
4010
4005
  , npixels, buffer_l/type_sz);
@@ -4028,22 +4023,32 @@ Image_import_pixels(int argc, VALUE *argv, VALUE self)
4028
4023
  , npixels, RARRAY(pixel_ary)->len);
4029
4024
  }
4030
4025
 
4031
- // Get array for integer pixels. Use Ruby's memory so GC will clean up after us
4032
- // in case of an exception.
4033
- pixels = ALLOC_N(int, npixels);
4034
- if (!pixels) // app recovered from exception...
4026
+ if (stg_type == DoublePixel || stg_type == FloatPixel)
4035
4027
  {
4036
- return self;
4028
+ // Get an array for double pixels. Use Ruby's memory so GC will clean up after
4029
+ // us in case of an exception.
4030
+ fpixels = ALLOC_N(double, npixels);
4031
+ for (n = 0; n < npixels; n++)
4032
+ {
4033
+ fpixels[n] = NUM2DBL(rb_ary_entry(pixel_ary, n));
4034
+ }
4035
+ buffer = (void *) fpixels;
4036
+ stg_type = DoublePixel;
4037
4037
  }
4038
-
4039
- for (n = 0; n < npixels; n++)
4038
+ else
4040
4039
  {
4041
- volatile VALUE p = rb_ary_entry(pixel_ary, n);
4042
- long q = ScaleQuantumToLong(NUM2LONG(p));
4043
- pixels[n] = (int) q;
4040
+ // Get array for integer pixels. Use Ruby's memory so GC will clean up after us
4041
+ // in case of an exception.
4042
+ pixels = ALLOC_N(int, npixels);
4043
+ for (n = 0; n < npixels; n++)
4044
+ {
4045
+ volatile VALUE p = rb_ary_entry(pixel_ary, n);
4046
+ long q = ScaleQuantumToLong(NUM2LONG(p));
4047
+ pixels[n] = (int) q;
4048
+ }
4049
+ buffer = (void *) pixels;
4050
+ stg_type = IntegerPixel;
4044
4051
  }
4045
- buffer = (void *) pixels;
4046
- stg_type = IntegerPixel;
4047
4052
  }
4048
4053
 
4049
4054
 
@@ -4054,6 +4059,10 @@ Image_import_pixels(int argc, VALUE *argv, VALUE self)
4054
4059
  {
4055
4060
  xfree((void *)pixels);
4056
4061
  }
4062
+ if (fpixels)
4063
+ {
4064
+ xfree((void *)fpixels);
4065
+ }
4057
4066
 
4058
4067
  if (!okay)
4059
4068
  {
@@ -4254,7 +4263,7 @@ Image_iptc_profile(VALUE self)
4254
4263
 
4255
4264
  profile = Qnil;
4256
4265
 
4257
- str_info = GetImageProfile(image, "iptc");
4266
+ str_info = (StringInfo *)GetImageProfile(image, "iptc");
4258
4267
  if (str_info)
4259
4268
  {
4260
4269
  str = StringInfoToString(str_info);
@@ -1,4 +1,4 @@
1
- /* $Id: rmmain.c,v 1.110 2006/01/20 23:59:46 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.111 2006/02/19 17:12:20 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmmain.c
@@ -818,6 +818,7 @@ Init_RMagick(void)
818
818
 
819
819
  DCL_ATTR_WRITER(Draw, affine)
820
820
  DCL_ATTR_WRITER(Draw, align)
821
+ DCL_ATTR_WRITER(Draw, border_color)
821
822
  DCL_ATTR_WRITER(Draw, decorate)
822
823
  DCL_ATTR_WRITER(Draw, density)
823
824
  DCL_ATTR_WRITER(Draw, encoding)
@@ -1661,7 +1662,7 @@ static void version_constants(void)
1661
1662
  rb_define_const(Module_Magick, "Version", str);
1662
1663
 
1663
1664
  sprintf(long_version,
1664
- "This is %s ($Date: 2006/01/20 23:59:46 $) Copyright (C) 2006 by Timothy P. Hunter\n"
1665
+ "This is %s ($Date: 2006/02/19 17:12:20 $) Copyright (C) 2006 by Timothy P. Hunter\n"
1665
1666
  "Built with %s\n"
1666
1667
  "Built for %s\n"
1667
1668
  "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.10.0"
4
+ s.version = "1.10.1"
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
@@ -13,7 +13,6 @@ DESCRIPTION
13
13
  s.homepage = %q{http://rubyforge.org/projects/rmagick}
14
14
  s.files = Dir.glob('**/*')
15
15
  s.require_paths = %w{lib .}
16
- s.autorequire = %q{RMagick}
17
16
  s.rubyforge_project = %q{rmagick}
18
17
  s.extensions = %w{configure}
19
18
  s.has_rdoc = false
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rmagick
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.10.0
7
- date: 2006-01-21 00:00:00 -05:00
6
+ version: 1.10.1
7
+ date: 2006-02-25 00:00:00 -05:00
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
@@ -13,7 +13,7 @@ email: rmagick@rubyforge.org
13
13
  homepage: http://rubyforge.org/projects/rmagick
14
14
  rubyforge_project: rmagick
15
15
  description: RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries.
16
- autorequire: RMagick
16
+ autorequire:
17
17
  default_executable:
18
18
  bindir: bin
19
19
  has_rdoc: false