rmagick 1.11.1 → 1.12.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.
- data/ChangeLog +4 -0
- data/README.html +8 -8
- data/README.txt +6 -6
- data/configure +10 -10
- data/configure.ac +1 -1
- data/doc/image2.html +94 -76
- data/ext/RMagick/MANIFEST +1 -1
- data/ext/RMagick/rmagick.h +2 -2
- data/ext/RMagick/rmimage.c +2 -2
- data/ext/RMagick/rmmain.c +3 -3
- data/lib/RMagick.rb +31 -3
- data/rmagick.gemspec +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
RMagick 1.12.0
|
2
|
+
o Fix bug #4630, the new signature for #level is incompatible with
|
3
|
+
releases prior to 1.10.1 (bug report from Al Evans)
|
4
|
+
|
1
5
|
RMagick 1.11.1
|
2
6
|
o Fix bug #4511, add Makefile, rmagick_config.h as dependencies
|
3
7
|
in the Makefile (bug report from Eric Hodel)
|
data/README.html
CHANGED
@@ -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.
|
4
|
+
<title>RMagick 1.12.0 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.
|
9
|
+
<h1>RMagick 1.12.0 README</h1>
|
10
10
|
|
11
|
-
<h2>
|
11
|
+
<h2>06/03/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="&#
|
45
|
+
<p><strong>Email:</strong> <a href="mailto:rmagick@rubyforge.org">rmagick@rubyforge.org</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
|
|
@@ -225,7 +225,7 @@ addition to the regular options, there are a few RMagick-specific options:</p>
|
|
225
225
|
|
226
226
|
<h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
|
227
227
|
|
228
|
-
<p>De-compress the RMagick-1.
|
228
|
+
<p>De-compress the RMagick-1.12.0.tar.gz archive and enter the top
|
229
229
|
directory. Then type:</p>
|
230
230
|
|
231
231
|
<pre><code>$ ./configure <configuration options>
|
@@ -246,9 +246,9 @@ $ make clean
|
|
246
246
|
|
247
247
|
<p>When make is running the examples, if you get a message like this:</p>
|
248
248
|
|
249
|
-
<pre><code>/home/you/RMagick-1.
|
249
|
+
<pre><code>/home/you/RMagick-1.12.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
|
250
250
|
cannot open shared object file: No such file or directory -
|
251
|
-
/home/you/RMagick-1.
|
251
|
+
/home/you/RMagick-1.12.0/ext/RMagick/RMagick.so (LoadError)
|
252
252
|
</code></pre>
|
253
253
|
|
254
254
|
<p>you probably do not have the directory in which the ImageMagick or GraphicsMagick
|
@@ -268,7 +268,7 @@ systems, see the documentation for the dynamic loading facility.</p>
|
|
268
268
|
|
269
269
|
<p>When make is running the examples, if you get a message like this:</p>
|
270
270
|
|
271
|
-
<pre><code>hook /home/me/src/RMagick-1.
|
271
|
+
<pre><code>hook /home/me/src/RMagick-1.12.0/./post-setup.rb failed:
|
272
272
|
No such file or directory - "/tmp/rmagick6872.6"
|
273
273
|
</code></pre>
|
274
274
|
|
data/README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
RMagick 1.
|
1
|
+
RMagick 1.12.0 README
|
2
2
|
================================
|
3
|
-
|
3
|
+
06/03/06
|
4
4
|
--------
|
5
5
|
|
6
6
|
Table Of Contents
|
@@ -193,7 +193,7 @@ addition to the regular options, there are a few RMagick-specific options:
|
|
193
193
|
|
194
194
|
<h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
|
195
195
|
|
196
|
-
De-compress the RMagick-1.
|
196
|
+
De-compress the RMagick-1.12.0.tar.gz archive and enter the top
|
197
197
|
directory. Then type:
|
198
198
|
|
199
199
|
$ ./configure <configuration options>
|
@@ -211,9 +211,9 @@ The message can also refer to "libGraphicsMagick". Typically this message means
|
|
211
211
|
#### Cannot open shared object file
|
212
212
|
When make is running the examples, if you get a message like this:
|
213
213
|
|
214
|
-
/home/you/RMagick-1.
|
214
|
+
/home/you/RMagick-1.12.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
|
215
215
|
cannot open shared object file: No such file or directory -
|
216
|
-
/home/you/RMagick-1.
|
216
|
+
/home/you/RMagick-1.12.0/ext/RMagick/RMagick.so (LoadError)
|
217
217
|
|
218
218
|
you probably do not have the directory in which the ImageMagick or GraphicsMagick
|
219
219
|
library is installed in your load path. An easy way to fix this is to define the
|
@@ -230,7 +230,7 @@ systems, see the documentation for the dynamic loading facility.
|
|
230
230
|
#### No such file or directory - "/tmp/rmagick6872.6"
|
231
231
|
When make is running the examples, if you get a message like this:
|
232
232
|
|
233
|
-
hook /home/me/src/RMagick-1.
|
233
|
+
hook /home/me/src/RMagick-1.12.0/./post-setup.rb failed:
|
234
234
|
No such file or directory - "/tmp/rmagick6872.6"
|
235
235
|
|
236
236
|
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.
|
3
|
+
# Generated by GNU Autoconf 2.59 for RMagick 1.12.0.
|
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.
|
272
|
-
PACKAGE_VERSION='1.
|
273
|
-
PACKAGE_STRING='RMagick 1.
|
271
|
+
PACKAGE_TARNAME='RMagick-1.12.0.tar.gz'
|
272
|
+
PACKAGE_VERSION='1.12.0'
|
273
|
+
PACKAGE_STRING='RMagick 1.12.0'
|
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.
|
782
|
+
\`configure' configures RMagick 1.12.0 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.
|
839
|
+
short | recursive ) echo "Configuration of RMagick 1.12.0:";;
|
840
840
|
esac
|
841
841
|
cat <<\_ACEOF
|
842
842
|
|
@@ -983,7 +983,7 @@ fi
|
|
983
983
|
test -n "$ac_init_help" && exit 0
|
984
984
|
if $ac_init_version; then
|
985
985
|
cat <<\_ACEOF
|
986
|
-
RMagick configure 1.
|
986
|
+
RMagick configure 1.12.0
|
987
987
|
generated by GNU Autoconf 2.59
|
988
988
|
|
989
989
|
Copyright (C) 2003 Free Software Foundation, Inc.
|
@@ -997,7 +997,7 @@ cat >&5 <<_ACEOF
|
|
997
997
|
This file contains any messages produced by compilers while
|
998
998
|
running configure, to aid debugging if configure makes a mistake.
|
999
999
|
|
1000
|
-
It was created by RMagick $as_me 1.
|
1000
|
+
It was created by RMagick $as_me 1.12.0, which was
|
1001
1001
|
generated by GNU Autoconf 2.59. Invocation command line was
|
1002
1002
|
|
1003
1003
|
$ $0 $@
|
@@ -9308,7 +9308,7 @@ _ASBOX
|
|
9308
9308
|
} >&5
|
9309
9309
|
cat >&5 <<_CSEOF
|
9310
9310
|
|
9311
|
-
This file was extended by RMagick $as_me 1.
|
9311
|
+
This file was extended by RMagick $as_me 1.12.0, which was
|
9312
9312
|
generated by GNU Autoconf 2.59. Invocation command line was
|
9313
9313
|
|
9314
9314
|
CONFIG_FILES = $CONFIG_FILES
|
@@ -9368,7 +9368,7 @@ _ACEOF
|
|
9368
9368
|
|
9369
9369
|
cat >>$CONFIG_STATUS <<_ACEOF
|
9370
9370
|
ac_cs_version="\\
|
9371
|
-
RMagick config.status 1.
|
9371
|
+
RMagick config.status 1.12.0
|
9372
9372
|
configured by $0, generated by GNU Autoconf 2.59,
|
9373
9373
|
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
9374
9374
|
|
data/configure.ac
CHANGED
data/doc/image2.html
CHANGED
@@ -572,10 +572,10 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
572
572
|
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
|
573
573
|
"Click to see the example script" /><!--
|
574
574
|
This img tag displays the framed image when the mouse is not over
|
575
|
-
--><img
|
575
|
+
--><img
|
576
576
|
onmouseover=
|
577
577
|
"this.style.display='none';frameless.style.display='';" src=
|
578
|
-
"ex/frame.jpg" alt="frame example"
|
578
|
+
"ex/frame.jpg" alt="frame example" name="framed" /></a>
|
579
579
|
<img src="ex/images/spin.gif" alt="" style=
|
580
580
|
"margin-bottom: 280px" title=
|
581
581
|
"Mouse over the example to see the original image" /></p>
|
@@ -1263,17 +1263,20 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1263
1263
|
<dl>
|
1264
1264
|
<dt>black_point</dt>
|
1265
1265
|
|
1266
|
-
<dd>
|
1266
|
+
<dd>A black point level in the range 0-<a href=
|
1267
|
+
"constants.html#Miscellaneous_constants">MaxRGB</a>. The
|
1268
|
+
default is 0.0.</dd>
|
1267
1269
|
|
1268
1270
|
<dt>mid_point</dt>
|
1269
1271
|
|
1270
|
-
<dd>
|
1271
|
-
"constants.html#Miscellaneous_constants">MaxRGB</a> -
|
1272
|
+
<dd>A white point level in the range 0-MaxRGB. The default is
|
1273
|
+
<a href="constants.html#Miscellaneous_constants">MaxRGB</a> -
|
1272
1274
|
<span class="arg">black_point</span>.</dd>
|
1273
1275
|
|
1274
1276
|
<dt>gamma</dt>
|
1275
1277
|
|
1276
|
-
<dd>
|
1278
|
+
<dd>A gamma correction in the range 0.0-10.0 The default is
|
1279
|
+
1.0.</dd>
|
1277
1280
|
</dl>
|
1278
1281
|
|
1279
1282
|
<h4>Returns</h4>
|
@@ -1292,6 +1295,29 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1292
1295
|
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
1293
1296
|
"Mouse over the image to see the original image" /></p>
|
1294
1297
|
|
1298
|
+
<h4>Compatibility notes</h4>
|
1299
|
+
|
1300
|
+
<p>Prior to version 1.11.0 RMagick defined the signature for
|
1301
|
+
<code>level</code> incorrectly:</p>
|
1302
|
+
<pre>
|
1303
|
+
img.level(white_point, gamma, black_point) -> anImage # wrong!
|
1304
|
+
</pre>
|
1305
|
+
|
1306
|
+
<p>That is, the <code>gamma</code> and <code>white_point</code>
|
1307
|
+
arguments were swapped. In an effort to maintain compatiblity
|
1308
|
+
with older scripts that expect that signature,
|
1309
|
+
<code>level</code> inspects its arguments and will interchange
|
1310
|
+
<code>white_point</code> and gamma if they "look" incorrect.
|
1311
|
+
That is, if <code>gamma</code> is > 10.0, or if
|
1312
|
+
<code>white_point</code> is < 10.0, or if <code>gamma</code>
|
1313
|
+
> <code>white_point</code>, then <code>level</code> will
|
1314
|
+
swap them.</p>
|
1315
|
+
|
1316
|
+
<p>If you want to avoid this behavior, use the
|
1317
|
+
<code>level2</code> method instead. The <code>level2</code>
|
1318
|
+
method is exactly the same as <code>level</code> except that it
|
1319
|
+
never swaps the arguments.</p>
|
1320
|
+
|
1295
1321
|
<h4>See also</h4>
|
1296
1322
|
|
1297
1323
|
<p><a href="#level_channel">level_channel</a></p>
|
@@ -1305,16 +1331,14 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1305
1331
|
<h3 id="level_channel">level_channel</h3>
|
1306
1332
|
|
1307
1333
|
<p><span class="arg">image</span>.level_channel(<span class=
|
1308
|
-
"arg">channel</span>, <span class=
|
1309
|
-
"arg">
|
1310
|
-
"arg">
|
1311
|
-
<span class="arg">gamma</span>=<code>1.0</code>) ->
|
1312
|
-
<em>anImage</em></p>
|
1334
|
+
"arg">channel</span>, <span class="arg">black_point</span>=0,
|
1335
|
+
<span class="arg">white_point</span>=MaxRGB - black_point,
|
1336
|
+
<span class="arg">gamma</span>=1.0) -> <em>anImage</em></p>
|
1313
1337
|
</div>
|
1314
1338
|
|
1315
1339
|
<div class="desc">
|
1316
|
-
<h4>Description</h4>Same as
|
1317
|
-
|
1340
|
+
<h4>Description</h4>Same as level but operates only on the
|
1341
|
+
specified channel.
|
1318
1342
|
|
1319
1343
|
<h4>Arguments</h4>
|
1320
1344
|
|
@@ -1326,17 +1350,20 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1326
1350
|
|
1327
1351
|
<dt>black_point</dt>
|
1328
1352
|
|
1329
|
-
<dd>
|
1353
|
+
<dd>A black point level in the range 0-<a href=
|
1354
|
+
"constants.html#Miscellaneous_constants">MaxRGB</a>. The
|
1355
|
+
default is 0.0.</dd>
|
1330
1356
|
|
1331
1357
|
<dt>mid_point</dt>
|
1332
1358
|
|
1333
|
-
<dd>
|
1334
|
-
"constants.html#Miscellaneous_constants">MaxRGB</a> -
|
1359
|
+
<dd>A white point level in the range 0-MaxRGB. The default is
|
1360
|
+
<a href="constants.html#Miscellaneous_constants">MaxRGB</a> -
|
1335
1361
|
<span class="arg">black_point</span>.</dd>
|
1336
1362
|
|
1337
1363
|
<dt>gamma</dt>
|
1338
1364
|
|
1339
|
-
<dd>
|
1365
|
+
<dd>A gamma correction in the range 0.0-10.0 The default is
|
1366
|
+
1.0.</dd>
|
1340
1367
|
</dl>
|
1341
1368
|
|
1342
1369
|
<h4>Returns</h4>
|
@@ -1384,9 +1411,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1384
1411
|
|
1385
1412
|
<p><a href="#magnify_bang">magnify!</a>, <a href=
|
1386
1413
|
"#minify">minify</a>, <a href="image3.html#resize">resize</a>,
|
1387
|
-
<a href="image3.html#scale">
|
1388
|
-
"image3.html#sample">sample</a>, <a href=
|
1389
|
-
"image3.html#thumbnail">thumbnail</a></p>
|
1414
|
+
<a href="image3.html#scale">scal</a></p>
|
1390
1415
|
|
1391
1416
|
<h4>Magick API</h4>
|
1392
1417
|
|
@@ -1412,8 +1437,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1412
1437
|
<h3 id="map">map</h3>
|
1413
1438
|
|
1414
1439
|
<p><span class="arg">image</span>.map(<span class=
|
1415
|
-
"arg">img</span>, <span class=
|
1416
|
-
"arg">dither</span>=<code>false</code>) ->
|
1440
|
+
"arg">img</span>, <span class="arg">dither</span>=false) ->
|
1417
1441
|
<em>anImage</em></p>
|
1418
1442
|
</div>
|
1419
1443
|
|
@@ -1429,11 +1453,11 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1429
1453
|
<dt>img</dt>
|
1430
1454
|
|
1431
1455
|
<dd>The reference image. May be either another image or an
|
1432
|
-
|
1456
|
+
Image object.</dd>
|
1433
1457
|
|
1434
1458
|
<dt>dither</dt>
|
1435
1459
|
|
1436
|
-
<dd>If
|
1460
|
+
<dd>If true, dithers the mapped image.</dd>
|
1437
1461
|
</dl>
|
1438
1462
|
|
1439
1463
|
<h4>Returns</h4>
|
@@ -1578,7 +1602,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1578
1602
|
<p>Makes the pixel at <span class="arg">x</span>, <span class=
|
1579
1603
|
"arg">y</span> transparent. This method makes a copy of the
|
1580
1604
|
image, just to make one pixel transparent. I recommend using
|
1581
|
-
the
|
1605
|
+
the Draw#matte method instead.</p>
|
1582
1606
|
|
1583
1607
|
<h4>Arguments</h4>
|
1584
1608
|
|
@@ -1617,10 +1641,10 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1617
1641
|
<h4>Example</h4>
|
1618
1642
|
|
1619
1643
|
<p>In this example the target pixel is a black pixel in the
|
1620
|
-
center of the uppermost circle. The
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1644
|
+
center of the uppermost circle. The matte_replace method makes
|
1645
|
+
all the black pixels in the image transparent. The resulting
|
1646
|
+
image has been composited over a plasma background, which shows
|
1647
|
+
through the transparent pixels.</p>
|
1624
1648
|
|
1625
1649
|
<p class="rollover"><a href=
|
1626
1650
|
"javascript:popup('matte_replace.rb.html')"><img onmouseover=
|
@@ -1692,9 +1716,8 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1692
1716
|
<h4>Example</h4>
|
1693
1717
|
|
1694
1718
|
<p>The left side of the image has been modified by <a href=
|
1695
|
-
"image1.html#add_noise"
|
1696
|
-
|
1697
|
-
<code>median_filter(0.05).</code></p><a href=
|
1719
|
+
"image1.html#add_noise">add_noise</a>. The right side has been
|
1720
|
+
filtered by median_filter(0.05).</p><a href=
|
1698
1721
|
"javascript:popup('median_filter.rb.html')"><img src=
|
1699
1722
|
"ex/median_filter.jpg" alt="median_filter example" /></a>
|
1700
1723
|
|
@@ -1774,9 +1797,9 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1774
1797
|
<h4>Arguments</h4>
|
1775
1798
|
|
1776
1799
|
<p>The percent change in the brightness, saturation, and hue,
|
1777
|
-
represented as
|
1778
|
-
|
1779
|
-
|
1800
|
+
represented as Float numbers. For example, 0.25 means "25%".
|
1801
|
+
All three arguments may be omitted. The default value of each
|
1802
|
+
argument is 1.0, that is, 100%.</p>
|
1780
1803
|
|
1781
1804
|
<h4>Returns</h4>
|
1782
1805
|
|
@@ -1784,7 +1807,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1784
1807
|
|
1785
1808
|
<h4>Example</h4>
|
1786
1809
|
|
1787
|
-
<p
|
1810
|
+
<p>modulate(0.85)</p>
|
1788
1811
|
|
1789
1812
|
<p class="rollover"><a href=
|
1790
1813
|
"javascript:popup('modulate.rb.html')"><img src=
|
@@ -1803,16 +1826,16 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1803
1826
|
<div class="sig">
|
1804
1827
|
<h3 id="monochrome_q">monochrome?</h3>
|
1805
1828
|
|
1806
|
-
<p><span class="arg">image</span>.monochrome? ->
|
1807
|
-
|
1829
|
+
<p><span class="arg">image</span>.monochrome? -> true or
|
1830
|
+
false</p>
|
1808
1831
|
</div>
|
1809
1832
|
|
1810
1833
|
<div class="desc">
|
1811
1834
|
<h4>Description</h4>
|
1812
1835
|
|
1813
|
-
<p>Returns
|
1814
|
-
|
1815
|
-
|
1836
|
+
<p>Returns true if all the pixels have the same red, green, and
|
1837
|
+
blue values and the values are either 0 or MaxRGB. That is, the
|
1838
|
+
image is black-and-white.</p>
|
1816
1839
|
|
1817
1840
|
<h4>See also</h4>
|
1818
1841
|
|
@@ -1837,10 +1860,9 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1837
1860
|
<p class="imquote">Simulates motion blur. We convolve the image
|
1838
1861
|
with a Gaussian operator of the given <span class=
|
1839
1862
|
"arg">radius</span> and standard deviation (<span class=
|
1840
|
-
"arg">sigma</span>). Use a radius of 0 and
|
1841
|
-
|
1842
|
-
|
1843
|
-
motion.</p>
|
1863
|
+
"arg">sigma</span>). Use a radius of 0 and motion_blur selects
|
1864
|
+
a suitable radius for you. <span class="arg">Angle</span> gives
|
1865
|
+
the angle of the blurring motion.</p>
|
1844
1866
|
|
1845
1867
|
<h4>Arguments</h4>
|
1846
1868
|
|
@@ -1888,8 +1910,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1888
1910
|
<h3 id="negate">negate</h3>
|
1889
1911
|
|
1890
1912
|
<p><span class="arg">image</span>.negate(<span class=
|
1891
|
-
"arg">grayscale</span
|
1892
|
-
<em>anImage</em></p>
|
1913
|
+
"arg">grayscale</span>=false) -> <em>anImage</em></p>
|
1893
1914
|
</div>
|
1894
1915
|
|
1895
1916
|
<div class="desc">
|
@@ -1928,7 +1949,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1928
1949
|
<h3 id="negate_channel">negate_channel</h3>
|
1929
1950
|
|
1930
1951
|
<p><span class="arg">image</span>.negate_channel(<span class=
|
1931
|
-
"arg">grayscale</span
|
1952
|
+
"arg">grayscale</span>=false, [<span class=
|
1932
1953
|
"arg">channel</span>...]) = <em>anImage</em></p>
|
1933
1954
|
</div>
|
1934
1955
|
|
@@ -1942,8 +1963,8 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1942
1963
|
<dl>
|
1943
1964
|
<dt>grayscale</dt>
|
1944
1965
|
|
1945
|
-
<dd class="imquote">if
|
1946
|
-
|
1966
|
+
<dd class="imquote">if true, only negate grayscale pixels
|
1967
|
+
within the image</dd>
|
1947
1968
|
|
1948
1969
|
<dt>channel...</dt>
|
1949
1970
|
|
@@ -1951,7 +1972,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1951
1972
|
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1952
1973
|
channels are specified, all the channels are negated.
|
1953
1974
|
Specifying no channel arguments has the same effect as the
|
1954
|
-
|
1975
|
+
negate method, above.</dd>
|
1955
1976
|
</dl>
|
1956
1977
|
|
1957
1978
|
<h4>Returns</h4>
|
@@ -1960,7 +1981,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1960
1981
|
|
1961
1982
|
<h4>Example</h4>
|
1962
1983
|
|
1963
|
-
<p
|
1984
|
+
<p>negate_channel(false, GreenChannel)</p>
|
1964
1985
|
|
1965
1986
|
<p class="rollover"><a href=
|
1966
1987
|
"javascript:popup('negate_channel.rb.html')"><img src=
|
@@ -2043,7 +2064,7 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2043
2064
|
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
2044
2065
|
channels are specified, all the channels are normalized.
|
2045
2066
|
Specifying no channel arguments has the same effect as the
|
2046
|
-
|
2067
|
+
normalize method, above.</dd>
|
2047
2068
|
</dl>
|
2048
2069
|
|
2049
2070
|
<h4>Returns</h4>
|
@@ -2113,12 +2134,12 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2113
2134
|
<dt>target</dt>
|
2114
2135
|
|
2115
2136
|
<dd>The color to be replaced. May be a color name or a
|
2116
|
-
<
|
2137
|
+
<a href="struct.html#Pixel">Pixel</a></dd>
|
2117
2138
|
|
2118
2139
|
<dt>fill</dt>
|
2119
2140
|
|
2120
|
-
<dd>The replacement color. May be a color name or a
|
2121
|
-
|
2141
|
+
<dd>The replacement color. May be a color name or a <a href=
|
2142
|
+
"struct.html#Pixel">Pixel</a></dd>
|
2122
2143
|
</dl>
|
2123
2144
|
|
2124
2145
|
<h4>Returns</h4>
|
@@ -2128,8 +2149,8 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2128
2149
|
<h4>Example</h4>
|
2129
2150
|
|
2130
2151
|
<p>This example replaces white pixels with red pixels. Set the
|
2131
|
-
|
2132
|
-
|
2152
|
+
fuzz attribute to specify how closely the target pixels must
|
2153
|
+
match.</p>
|
2133
2154
|
|
2134
2155
|
<p class="rollover"><a href=
|
2135
2156
|
"javascript:popup('opaque.rb.html')"><img src="ex/opaque.jpg"
|
@@ -2152,20 +2173,20 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2152
2173
|
<div class="sig">
|
2153
2174
|
<h3 id="opaque_q">opaque?</h3>
|
2154
2175
|
|
2155
|
-
<p><span class="arg">image</span>.opaque? ->
|
2156
|
-
|
2176
|
+
<p><span class="arg">image</span>.opaque? -> true or
|
2177
|
+
false</p>
|
2157
2178
|
</div>
|
2158
2179
|
|
2159
2180
|
<div class="desc">
|
2160
2181
|
<h4>Description</h4>
|
2161
2182
|
|
2162
|
-
<p>Returns
|
2163
|
-
|
2183
|
+
<p>Returns true if all of the pixels in the receiver have an
|
2184
|
+
opacity value of <a href=
|
2164
2185
|
"constants.html#Opacity">OpaqueOpacity</a>.</p>
|
2165
2186
|
|
2166
2187
|
<h4>Returns</h4>
|
2167
2188
|
|
2168
|
-
<p
|
2189
|
+
<p>true or false</p>
|
2169
2190
|
|
2170
2191
|
<h4>Magick API</h4>
|
2171
2192
|
|
@@ -2223,20 +2244,20 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2223
2244
|
<div class="sig">
|
2224
2245
|
<h3 id="palette_q">palette?</h3>
|
2225
2246
|
|
2226
|
-
<p><span class="arg">image</span>.palette? ->
|
2227
|
-
|
2247
|
+
<p><span class="arg">image</span>.palette? -> true or
|
2248
|
+
false</p>
|
2228
2249
|
</div>
|
2229
2250
|
|
2230
2251
|
<div class="desc">
|
2231
2252
|
<h4>Description</h4>
|
2232
2253
|
|
2233
2254
|
<p class="imquote">Returns true if the image is <a href=
|
2234
|
-
"constants.html#ClassType"
|
2235
|
-
|
2255
|
+
"constants.html#ClassType">PseudoClass</a> and has 256 unique
|
2256
|
+
colors or less.</p>
|
2236
2257
|
|
2237
2258
|
<h4>Returns</h4>
|
2238
2259
|
|
2239
|
-
<p
|
2260
|
+
<p>true or false</p>
|
2240
2261
|
|
2241
2262
|
<h4>Magick API</h4>
|
2242
2263
|
|
@@ -2258,9 +2279,8 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
2258
2279
|
"arg">x</span>, <span class="arg">y</span>. Optionally, changes
|
2259
2280
|
the color of the pixel to a new color.</p>
|
2260
2281
|
|
2261
|
-
<p>If
|
2262
|
-
|
2263
|
-
<code>DirectClass</code> if necessary.</p>
|
2282
|
+
<p>If new_color is specified, pixel_color changes the image
|
2283
|
+
type to DirectClass if necessary.</p>
|
2264
2284
|
|
2265
2285
|
<h4>Arguments</h4>
|
2266
2286
|
|
@@ -2293,9 +2313,8 @@ old = image.pixel_color(20,40,"white")
|
|
2293
2313
|
<h3 id="posterize">posterize</h3>
|
2294
2314
|
|
2295
2315
|
<p><span class="arg">image</span>.posterize(<span class=
|
2296
|
-
"arg">levels</span>=4, <span class=
|
2297
|
-
|
2298
|
-
<em>anImage</em></p>
|
2316
|
+
"arg">levels</span>=4, <span class="arg">dither</span>=false)
|
2317
|
+
-> <em>anImage</em></p>
|
2299
2318
|
</div>
|
2300
2319
|
|
2301
2320
|
<div class="desc">
|
@@ -2315,8 +2334,7 @@ old = image.pixel_color(20,40,"white")
|
|
2315
2334
|
|
2316
2335
|
<dt>dither</dt>
|
2317
2336
|
|
2318
|
-
<dd>If
|
2319
|
-
<code>false</code>.</dd>
|
2337
|
+
<dd>If true, dither the image. The default is false.</dd>
|
2320
2338
|
</dl>
|
2321
2339
|
|
2322
2340
|
<h4>Returns</h4>
|
data/ext/RMagick/MANIFEST
CHANGED
data/ext/RMagick/rmagick.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmagick.h,v 1.
|
1
|
+
/* $Id: rmagick.h,v 1.110 2006/06/02 23:26:53 rmagick Exp $ */
|
2
2
|
/*=============================================================================
|
3
3
|
| Copyright (C) 2006 by Timothy P. Hunter
|
4
4
|
| Name: rmagick.h
|
@@ -805,7 +805,7 @@ extern VALUE Image_implode(int, VALUE *, VALUE);
|
|
805
805
|
extern VALUE Image_import_pixels(int, VALUE *, VALUE);
|
806
806
|
extern VALUE Image_init_copy(VALUE, VALUE);
|
807
807
|
extern VALUE Image_inspect(VALUE);
|
808
|
-
extern VALUE
|
808
|
+
extern VALUE Image_level2(int, VALUE *, VALUE);
|
809
809
|
extern VALUE Image_level_channel(int, VALUE *, VALUE);
|
810
810
|
extern VALUE Image__load(VALUE, VALUE);
|
811
811
|
extern VALUE Image_magnify(VALUE);
|
data/ext/RMagick/rmimage.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmimage.c,v 1.
|
1
|
+
/* $Id: rmimage.c,v 1.147 2006/06/02 23:26:53 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
3
|
| Copyright (C) 2006 by Timothy P. Hunter
|
4
4
|
| Name: rmimage.c
|
@@ -4578,7 +4578,7 @@ DEF_ATTR_ACCESSOR(Image, iterations, int)
|
|
4578
4578
|
Notes: all three arguments are optional
|
4579
4579
|
*/
|
4580
4580
|
VALUE
|
4581
|
-
|
4581
|
+
Image_level2(int argc, VALUE *argv, VALUE self)
|
4582
4582
|
{
|
4583
4583
|
Image *image, *new_image;
|
4584
4584
|
double black_point = 0.0, gamma = 1.0, white_point = (double)MaxRGB;
|
data/ext/RMagick/rmmain.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmmain.c,v 1.
|
1
|
+
/* $Id: rmmain.c,v 1.120 2006/06/02 23:26:53 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
3
|
| Copyright (C) 2006 by Timothy P. Hunter
|
4
4
|
| Name: rmmain.c
|
@@ -804,7 +804,7 @@ Init_RMagick(void)
|
|
804
804
|
rb_define_method(Class_Image, "import_pixels", Image_import_pixels, -1);
|
805
805
|
rb_define_method(Class_Image, "initialize_copy", Image_init_copy, 1);
|
806
806
|
rb_define_method(Class_Image, "inspect", Image_inspect, 0);
|
807
|
-
rb_define_method(Class_Image, "
|
807
|
+
rb_define_method(Class_Image, "level2", Image_level2, -1);
|
808
808
|
rb_define_method(Class_Image, "level_channel", Image_level_channel, -1);
|
809
809
|
rb_define_method(Class_Image, "magnify", Image_magnify, 0);
|
810
810
|
rb_define_method(Class_Image, "magnify!", Image_magnify_bang, 0);
|
@@ -1786,7 +1786,7 @@ static void version_constants(void)
|
|
1786
1786
|
rb_define_const(Module_Magick, "Version", str);
|
1787
1787
|
|
1788
1788
|
sprintf(long_version,
|
1789
|
-
"This is %s ($Date: 2006/
|
1789
|
+
"This is %s ($Date: 2006/06/02 23:26:53 $) Copyright (C) 2006 by Timothy P. Hunter\n"
|
1790
1790
|
"Built with %s\n"
|
1791
1791
|
"Built for %s\n"
|
1792
1792
|
"Web page: http://rmagick.rubyforge.org\n"
|
data/lib/RMagick.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: RMagick.rb,v 1.
|
1
|
+
# $Id: RMagick.rb,v 1.42 2006/06/03 22:56:40 rmagick Exp $
|
2
2
|
#==============================================================================
|
3
3
|
# Copyright (C) 2006 by Timothy P. Hunter
|
4
4
|
# Name: RMagick.rb
|
@@ -698,8 +698,36 @@ class Image
|
|
698
698
|
return hash
|
699
699
|
end
|
700
700
|
|
701
|
-
#
|
702
|
-
#
|
701
|
+
# Patches problematic change to the order of arguments in 1.11.0.
|
702
|
+
# Before this release, the order was
|
703
|
+
# black_point, gamma, white_point
|
704
|
+
# RMagick 1.11.0 changed this to
|
705
|
+
# black_point, white_point, gamma
|
706
|
+
# This fix tries to determine if the arguments are in the old order and
|
707
|
+
# if so, swaps the gamma and white_point arguments. Then it calls
|
708
|
+
# level2, which simply accepts the arguments as given.
|
709
|
+
|
710
|
+
# Inspect the gamma and white point values and swap them if they
|
711
|
+
# look like they're in the old order.
|
712
|
+
|
713
|
+
# (Thanks to Al Evans for the suggestion.)
|
714
|
+
def level(black_point=0.0, white_point=nil, gamma=nil)
|
715
|
+
white_point ||= Magick::MaxRGB - black_point
|
716
|
+
gamma_arg = gamma
|
717
|
+
gamma ||= 1.0
|
718
|
+
|
719
|
+
if gamma.abs > 10.0 || white_point.abs <= 10.0 || white_point.abs < gamma.abs
|
720
|
+
gamma, white_point = white_point, gamma
|
721
|
+
unless gamma_arg
|
722
|
+
white_point = Magick::MaxRGB - black_point
|
723
|
+
end
|
724
|
+
end
|
725
|
+
|
726
|
+
return level2(black_point, white_point, gamma)
|
727
|
+
end
|
728
|
+
|
729
|
+
# These four methods are equivalent to the Draw#matte method
|
730
|
+
# with the "Point", "Replace", "Floodfill", "FilltoBorder", and
|
703
731
|
# "Replace" arguments, respectively.
|
704
732
|
|
705
733
|
# Make the pixel at (x,y) transparent.
|
data/rmagick.gemspec
CHANGED
@@ -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.
|
4
|
+
s.version = "1.12.0"
|
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.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rmagick
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date: 2006-
|
6
|
+
version: 1.12.0
|
7
|
+
date: 2006-06-03 00:00:00 -04: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
|