rmagick 2.13.2 → 2.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.travis.yml +57 -0
- data/CONTRIBUTING.md +22 -0
- data/ChangeLog +47 -4
- data/Gemfile +7 -0
- data/LICENSE +20 -0
- data/README.textile +161 -0
- data/Rakefile +176 -0
- data/before_install_linux.sh +12 -0
- data/before_install_osx.sh +2 -0
- data/doc/.cvsignore +1 -0
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +2 -2
- data/doc/draw.html +2 -2
- data/doc/ex/PreserveAspectRatio.rb +0 -0
- data/doc/ex/ViewBox.rb +0 -0
- data/doc/ex/adaptive_threshold.rb +0 -0
- data/doc/ex/add_noise.rb +0 -0
- data/doc/ex/affine.rb +0 -0
- data/doc/ex/affine_transform.rb +0 -0
- data/doc/ex/arc.rb +0 -0
- data/doc/ex/arcpath.rb +0 -0
- data/doc/ex/average.rb +0 -0
- data/doc/ex/axes.rb +0 -0
- data/doc/ex/bilevel_channel.rb +0 -0
- data/doc/ex/blur_image.rb +0 -0
- data/doc/ex/border.rb +0 -0
- data/doc/ex/bounding_box.rb +0 -0
- data/doc/ex/cbezier1.rb +0 -0
- data/doc/ex/cbezier2.rb +0 -0
- data/doc/ex/cbezier3.rb +0 -0
- data/doc/ex/cbezier4.rb +0 -0
- data/doc/ex/cbezier5.rb +0 -0
- data/doc/ex/cbezier6.rb +0 -0
- data/doc/ex/channel.rb +0 -0
- data/doc/ex/charcoal.rb +0 -0
- data/doc/ex/chop.rb +0 -0
- data/doc/ex/circle.rb +0 -0
- data/doc/ex/clip_path.rb +0 -0
- data/doc/ex/coalesce.rb +0 -0
- data/doc/ex/color_fill_to_border.rb +0 -0
- data/doc/ex/color_floodfill.rb +0 -0
- data/doc/ex/color_histogram.rb +0 -0
- data/doc/ex/color_reset.rb +0 -0
- data/doc/ex/colorize.rb +0 -0
- data/doc/ex/colors.rb +0 -0
- data/doc/ex/composite.rb +0 -0
- data/doc/ex/composite_layers.rb +0 -0
- data/doc/ex/contrast.rb +0 -0
- data/doc/ex/crop.rb +0 -0
- data/doc/ex/cycle_colormap.rb +0 -0
- data/doc/ex/drawcomp.rb +0 -0
- data/doc/ex/drop_shadow.rb +0 -0
- data/doc/ex/edge.rb +0 -0
- data/doc/ex/ellipse.rb +0 -0
- data/doc/ex/emboss.rb +0 -0
- data/doc/ex/enhance.rb +0 -0
- data/doc/ex/equalize.rb +0 -0
- data/doc/ex/evenodd.rb +0 -0
- data/doc/ex/flatten_images.rb +0 -0
- data/doc/ex/flip.rb +0 -0
- data/doc/ex/flop.rb +0 -0
- data/doc/ex/fonts.rb +0 -0
- data/doc/ex/frame.rb +0 -0
- data/doc/ex/gaussian_blur.rb +0 -0
- data/doc/ex/get_pixels.rb +0 -0
- data/doc/ex/gradientfill.rb +0 -0
- data/doc/ex/grav.rb +0 -0
- data/doc/ex/gravity.rb +0 -0
- data/doc/ex/hatchfill.rb +0 -0
- data/doc/ex/images/image_with_profile.jpg +0 -0
- data/doc/ex/images/logo400x83.gif +0 -0
- data/doc/ex/implode.rb +0 -0
- data/doc/ex/level.rb +0 -0
- data/doc/ex/line.rb +0 -0
- data/doc/ex/mask.rb +1 -1
- data/doc/ex/matte_fill_to_border.rb +0 -0
- data/doc/ex/matte_floodfill.rb +0 -0
- data/doc/ex/matte_replace.rb +0 -0
- data/doc/ex/median_filter.rb +0 -0
- data/doc/ex/modulate.rb +0 -0
- data/doc/ex/mono.rb +0 -0
- data/doc/ex/morph.rb +0 -0
- data/doc/ex/mosaic.rb +0 -0
- data/doc/ex/motion_blur.rb +0 -0
- data/doc/ex/negate.rb +0 -0
- data/doc/ex/nested_rvg.rb +0 -0
- data/doc/ex/nonzero.rb +0 -0
- data/doc/ex/normalize.rb +0 -0
- data/doc/ex/oil_paint.rb +0 -0
- data/doc/ex/opacity.rb +0 -0
- data/doc/ex/ordered_dither.rb +0 -0
- data/doc/ex/path.rb +0 -0
- data/doc/ex/pattern1.rb +0 -0
- data/doc/ex/pattern2.rb +0 -0
- data/doc/ex/polygon.rb +0 -0
- data/doc/ex/polyline.rb +0 -0
- data/doc/ex/preview.rb +0 -0
- data/doc/ex/qbezierpath.rb +0 -0
- data/doc/ex/quantize-m.rb +0 -0
- data/doc/ex/radial_blur.rb +0 -0
- data/doc/ex/raise.rb +0 -0
- data/doc/ex/rectangle.rb +0 -0
- data/doc/ex/reduce_noise.rb +0 -0
- data/doc/ex/roll.rb +0 -0
- data/doc/ex/rotate.rb +0 -0
- data/doc/ex/rotate_f.rb +0 -0
- data/doc/ex/roundrect.rb +0 -0
- data/doc/ex/rubyname.rb +0 -0
- data/doc/ex/rvg_linecap.rb +0 -0
- data/doc/ex/rvg_linejoin.rb +0 -0
- data/doc/ex/rvg_opacity.rb +0 -0
- data/doc/ex/rvg_stroke_dasharray.rb +0 -0
- data/doc/ex/segment.rb +0 -0
- data/doc/ex/shade.rb +0 -0
- data/doc/ex/shave.rb +0 -0
- data/doc/ex/shear.rb +0 -0
- data/doc/ex/sketch.rb +0 -0
- data/doc/ex/skewx.rb +0 -0
- data/doc/ex/skewy.rb +0 -0
- data/doc/ex/smile.rb +0 -0
- data/doc/ex/solarize.rb +0 -0
- data/doc/ex/spread.rb +0 -0
- data/doc/ex/stegano.rb +0 -0
- data/doc/ex/stroke_dasharray.rb +0 -0
- data/doc/ex/stroke_fill.rb +0 -0
- data/doc/ex/stroke_linecap.rb +0 -0
- data/doc/ex/stroke_linejoin.rb +0 -0
- data/doc/ex/stroke_width.rb +0 -0
- data/doc/ex/swirl.rb +0 -0
- data/doc/ex/text.rb +0 -0
- data/doc/ex/text_align.rb +0 -0
- data/doc/ex/text_antialias.rb +0 -0
- data/doc/ex/text_undercolor.rb +0 -0
- data/doc/ex/texture_fill_to_border.rb +0 -0
- data/doc/ex/texture_floodfill.rb +0 -0
- data/doc/ex/texturefill.rb +0 -0
- data/doc/ex/threshold.rb +0 -0
- data/doc/ex/to_blob.rb +0 -0
- data/doc/ex/translate.rb +0 -0
- data/doc/ex/transparent.rb +0 -0
- data/doc/ex/unsharp_mask.rb +0 -0
- data/doc/ex/wave.rb +0 -0
- data/doc/ilist.html +2 -2
- data/doc/image1.html +2 -2
- data/doc/image2.html +2 -2
- data/doc/image3.html +2 -2
- data/doc/imageattrs.html +2 -2
- data/doc/imusage.html +2 -2
- data/doc/index.html +3 -3
- data/doc/info.html +2 -2
- data/doc/magick.html +2 -2
- data/doc/optequiv.html +2 -2
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +2 -2
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +2 -2
- data/doc/usage.html +2 -2
- data/examples/crop_with_gravity.rb +0 -0
- data/examples/demo.rb +0 -0
- data/examples/describe.rb +0 -0
- data/examples/identify.rb +1 -1
- data/examples/rotating_text.rb +0 -0
- data/ext/RMagick/extconf.rb +59 -30
- data/ext/RMagick/rmagick.c +15 -15
- data/ext/RMagick/rmagick.h +9 -7
- data/ext/RMagick/rmdraw.c +12 -12
- data/ext/RMagick/rmenum.c +2 -2
- data/ext/RMagick/rmfill.c +25 -25
- data/ext/RMagick/rmilist.c +121 -104
- data/ext/RMagick/rmimage.c +738 -547
- data/ext/RMagick/rminfo.c +15 -15
- data/ext/RMagick/rmmain.c +27 -3
- data/ext/RMagick/rmpixel.c +25 -27
- data/ext/RMagick/rmstruct.c +1 -1
- data/ext/RMagick/rmutil.c +18 -18
- data/lib/RMagick.rb +1 -1962
- data/lib/rmagick/version.rb +5 -0
- data/lib/rmagick.rb +1 -0
- data/lib/rmagick_internal.rb +1964 -0
- data/rmagick.gemspec +21 -9
- data/test/Draw.rb +121 -0
- data/test/Image1.rb +763 -0
- data/test/Image2.rb +1312 -0
- data/test/Image3.rb +1033 -0
- data/test/ImageList1.rb +808 -0
- data/test/ImageList2.rb +389 -0
- data/test/Image_attributes.rb +700 -0
- data/test/Import_Export.rb +126 -0
- data/test/Info.rb +349 -0
- data/test/Magick.rb +324 -0
- data/test/Pixel.rb +119 -0
- data/test/Preview.rb +62 -0
- data/test/cmyk.icm +0 -0
- data/test/srgb.icm +0 -0
- data/test/test_all_basic.rb +34 -0
- data/test/tmpnam_test.rb +50 -0
- metadata +373 -322
- data/README-Mac-OSX.txt +0 -1
- data/README.html +0 -10
- data/build_tarball.rake +0 -215
- data/ext/RMagick/MANIFEST +0 -358
- data/metaconfig +0 -7
- data/post-clean.rb +0 -12
- data/post-install.rb +0 -50
- data/post-setup.rb +0 -254
- data/setup.rb +0 -1585
- data/uninstall.rb +0 -76
data/doc/rvgtext.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: RVG Reference: RVG::Text Class</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</head>
|
|
34
34
|
|
|
35
35
|
<body>
|
|
36
|
-
<h6 id="header">RMagick
|
|
36
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
37
37
|
|
|
38
38
|
<div class="nav">
|
|
39
39
|
« <a href="rvgclip.html">Prev</a> | <a href=
|
data/doc/rvgtspan.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: RVG Reference: RVG::Tspan Class</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</head>
|
|
28
28
|
|
|
29
29
|
<body>
|
|
30
|
-
<h6 id="header">RMagick
|
|
30
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
31
31
|
|
|
32
32
|
<div class="nav">
|
|
33
33
|
« <a href="rvgtext.html">Prev</a> | <a href=
|
data/doc/rvgtut.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="generator" content=
|
|
10
10
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
11
11
|
|
|
12
|
-
<title>RMagick
|
|
12
|
+
<title>RMagick 0.0.0: RVG Tutorial</title>
|
|
13
13
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
14
14
|
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
|
15
15
|
<style type="text/css">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</head>
|
|
24
24
|
|
|
25
25
|
<body>
|
|
26
|
-
<h6 id="header">RMagick
|
|
26
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
27
27
|
|
|
28
28
|
<div class="nav">
|
|
29
29
|
« <a href="constants.html">Prev</a> | <a href=
|
data/doc/rvguse.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: RVG Reference: RVG::Use Class</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</head>
|
|
28
28
|
|
|
29
29
|
<body>
|
|
30
|
-
<h6 id="header">RMagick
|
|
30
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
31
31
|
|
|
32
32
|
<div class="nav">
|
|
33
33
|
« <a href="rvgtspan.html">Prev</a> | <a href=
|
data/doc/rvgxform.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: RVG Reference: Transforms</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</head>
|
|
29
29
|
|
|
30
30
|
<body>
|
|
31
|
-
<h6 id="header">RMagick
|
|
31
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
32
32
|
|
|
33
33
|
<div class="nav">
|
|
34
34
|
« <a href="rvgshape.html">Prev</a> | <a href=
|
data/doc/struct.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: Miscellaneous classes</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</head>
|
|
28
28
|
|
|
29
29
|
<body>
|
|
30
|
-
<h6 id="header">RMagick
|
|
30
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
31
31
|
|
|
32
32
|
<div class="nav">
|
|
33
33
|
« <a href="draw.html">Prev</a> | <a href=
|
data/doc/usage.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="generator" content=
|
|
7
7
|
"HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
|
|
8
8
|
|
|
9
|
-
<title>RMagick
|
|
9
|
+
<title>RMagick 0.0.0: How to use RMagick</title>
|
|
10
10
|
<meta http-equiv="Content-Type" content=
|
|
11
11
|
"text/html; charset=us-ascii" />
|
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
</head>
|
|
91
91
|
|
|
92
92
|
<body>
|
|
93
|
-
<h6 id="header">RMagick
|
|
93
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
|
94
94
|
|
|
95
95
|
<div class="nav">
|
|
96
96
|
« <a href="index.html">Prev</a> | <a href=
|
|
File without changes
|
data/examples/demo.rb
CHANGED
|
File without changes
|
data/examples/describe.rb
CHANGED
|
File without changes
|
data/examples/identify.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Magick
|
|
|
32
32
|
puts "\t\tGray: #{channel_depth(Magick::GrayChannel)}-bits\n"
|
|
33
33
|
puts "\t\tOpacity: #{channel_depth(Magick::OpacityChannel)}-bits\n" if matte
|
|
34
34
|
end
|
|
35
|
-
scale = Magick::QuantumRange / (Magick::QuantumRange >> (Magick::
|
|
35
|
+
scale = Magick::QuantumRange / (Magick::QuantumRange >> (Magick::MAGICKCORE_QUANTUM_DEPTH-channel_depth))
|
|
36
36
|
puts "\tChannel statistics:\n"
|
|
37
37
|
case color_space
|
|
38
38
|
when Magick::RGBColorspace
|
data/examples/rotating_text.rb
CHANGED
|
File without changes
|
data/ext/RMagick/extconf.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
require "mkmf"
|
|
2
2
|
require "date"
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
require_relative '../../lib/rmagick/version'
|
|
5
|
+
|
|
6
|
+
RMAGICK_VERS = Magick::VERSION
|
|
7
|
+
MIN_RUBY_VERS = Magick::MIN_RUBY_VERSION
|
|
6
8
|
MIN_RUBY_VERS_NO = MIN_RUBY_VERS.tr(".","").to_i
|
|
7
|
-
MIN_IM_VERS =
|
|
9
|
+
MIN_IM_VERS = Magick::MIN_IM_VERSION
|
|
8
10
|
MIN_IM_VERS_NO = MIN_IM_VERS.tr(".","").to_i
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
12
|
# Test for a specific value in an enum type
|
|
13
13
|
def have_enum_value(enum, value, headers=nil, &b)
|
|
14
14
|
checking_for "#{enum}.#{value}" do
|
|
@@ -131,9 +131,17 @@ if RUBY_PLATFORM !~ /mswin|mingw/
|
|
|
131
131
|
exit_failure "No C compiler found in ${ENV['PATH']}. See mkmf.log for details."
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
+
# ugly way to handle which config tool we're going to use...
|
|
135
|
+
$magick_config = false
|
|
136
|
+
$pkg_config = false
|
|
137
|
+
|
|
134
138
|
# Check for Magick-config
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
if find_executable("Magick-config")
|
|
140
|
+
$magick_config = true
|
|
141
|
+
elsif find_executable("pkg-config")
|
|
142
|
+
$pkg_config = true
|
|
143
|
+
else
|
|
144
|
+
exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config or pkg-config in #{ENV['PATH']}\n"
|
|
137
145
|
end
|
|
138
146
|
|
|
139
147
|
check_multiple_imagemagick_versions()
|
|
@@ -141,38 +149,48 @@ if RUBY_PLATFORM !~ /mswin|mingw/
|
|
|
141
149
|
|
|
142
150
|
# Ensure minimum ImageMagick version
|
|
143
151
|
unless checking_for("ImageMagick version >= #{MIN_IM_VERS}") do
|
|
144
|
-
version
|
|
145
|
-
|
|
152
|
+
# extract version info from convert binary (could use identify as well)
|
|
153
|
+
convert_version_string = /^Version: ImageMagick\s+(?<Version>\d+\.\d+\.\d+\-\d+)\s+(?<Unknown>\S+)\s+(?<Arch>\S+)\s+(?<Date>\S+)/
|
|
154
|
+
match_data = `convert -version`.match(convert_version_string)
|
|
155
|
+
unless match_data.nil?
|
|
156
|
+
# taken from previous version, this doesn't look right though
|
|
157
|
+
# for example 6.8.12 whould show as greater than 6.12.9
|
|
158
|
+
# is there some property of imagemagick versioning that prevents this situation?
|
|
159
|
+
version = match_data['Version'].chomp.tr(".","").to_i
|
|
160
|
+
version >= MIN_IM_VERS_NO
|
|
161
|
+
end
|
|
146
162
|
end
|
|
147
163
|
exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
|
|
148
164
|
end
|
|
149
165
|
|
|
150
166
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
end
|
|
159
|
-
exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
|
|
160
|
-
"\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+
|
|
161
|
-
"\nDon't use the --enable-hdri option when configuring ImageMagick.\n"
|
|
167
|
+
# either set flags using Magick-config or pkg-config (new Debian default)
|
|
168
|
+
if $magick_config
|
|
169
|
+
# Save flags
|
|
170
|
+
$CFLAGS = ENV["CFLAGS"].to_s + " " + `Magick-config --cflags`.chomp
|
|
171
|
+
$CPPFLAGS = ENV["CPPFLAGS"].to_s + " " + `Magick-config --cppflags`.chomp
|
|
172
|
+
$LDFLAGS = ENV["LDFLAGS"].to_s + " " + `Magick-config --ldflags`.chomp
|
|
173
|
+
$LOCAL_LIBS = ENV["LIBS"].to_s + " " + `Magick-config --libs`.chomp
|
|
162
174
|
end
|
|
163
175
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
176
|
+
if $pkg_config
|
|
177
|
+
# Save flags
|
|
178
|
+
$CFLAGS = ENV["CFLAGS"].to_s + " " + `pkg-config --cflags MagickCore`.chomp
|
|
179
|
+
$CPPFLAGS = ENV["CPPFLAGS"].to_s + " " + `pkg-config --cflags MagickCore`.chomp
|
|
180
|
+
$LDFLAGS = ENV["LDFLAGS"].to_s + " " + `pkg-config --libs MagickCore`.chomp
|
|
181
|
+
$LOCAL_LIBS = ENV["LIBS"].to_s + " " + `pkg-config --libs MagickCore`.chomp
|
|
182
|
+
end
|
|
169
183
|
|
|
170
184
|
elsif RUBY_PLATFORM =~ /mingw/ # mingw
|
|
171
185
|
|
|
172
186
|
`convert -version` =~ /Version: ImageMagick (\d+\.\d+\.\d+)-\d+ /
|
|
173
187
|
abort "Unable to get ImageMagick version" unless $1
|
|
174
188
|
$magick_version = $1
|
|
175
|
-
|
|
189
|
+
if RUBY_PLATFORM =~ /x64/
|
|
190
|
+
$LOCAL_LIBS = '-lCORE_RL_magick_'
|
|
191
|
+
else
|
|
192
|
+
$LOCAL_LIBS = '-lCORE_RL_magick_ -lX11'
|
|
193
|
+
end
|
|
176
194
|
|
|
177
195
|
else # mswin
|
|
178
196
|
|
|
@@ -205,10 +223,13 @@ end
|
|
|
205
223
|
|
|
206
224
|
if RUBY_PLATFORM !~ /mswin|mingw/
|
|
207
225
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
226
|
+
# check for pkg-config if Magick-config doesn't exist
|
|
227
|
+
if $magick_config && `Magick-config --libs`[/\bl\s*(MagickCore|Magick)6?\b/]
|
|
228
|
+
elsif $pkg_config && `pkg-config --libs MagickCore`[/\bl\s*(MagickCore|Magick)6?\b/]
|
|
229
|
+
else
|
|
230
|
+
exit_failure "Can't install RMagick #{RMAGICK_VERS}. " +
|
|
231
|
+
"Can't find the ImageMagick library or one of the dependent libraries. " +
|
|
232
|
+
"Check the mkmf.log file for more detailed information.\n"
|
|
212
233
|
end
|
|
213
234
|
end
|
|
214
235
|
|
|
@@ -220,15 +241,19 @@ have_func("snprintf", headers)
|
|
|
220
241
|
"AutoGammaImageChannel", # 6.5.5-1
|
|
221
242
|
"AutoLevelImageChannel", # 6.5.5-1
|
|
222
243
|
"BlueShiftImage", # 6.5.4-3
|
|
244
|
+
"ColorMatrixImage", # 6.6.1-0
|
|
223
245
|
"ConstituteComponentTerminus", # 6.5.7-9
|
|
224
246
|
"DeskewImage", # 6.4.2-5
|
|
247
|
+
"DestroyConstitute", # 6.5.7-9(deprecated)
|
|
225
248
|
"EncipherImage", # 6.3.8-6
|
|
226
249
|
"EqualizeImageChannel", # 6.3.6-9
|
|
250
|
+
"EvaluateImages", # 6.8.6-4
|
|
227
251
|
"FloodfillPaintImage", # 6.3.7
|
|
228
252
|
"FunctionImageChannel", # 6.4.8-8
|
|
229
253
|
"GetAuthenticIndexQueue", # 6.4.5-6
|
|
230
254
|
"GetAuthenticPixels", # 6.4.5-6
|
|
231
255
|
"GetImageAlphaChannel", # 6.3.9-2
|
|
256
|
+
"GetMagickFeatures", # 6.5.7-1
|
|
232
257
|
"GetVirtualPixels", # 6.4.5-6
|
|
233
258
|
"LevelImageColors", # 6.4.2
|
|
234
259
|
"LevelColorsImageChannel", # 6.5.6-4
|
|
@@ -238,12 +263,16 @@ have_func("snprintf", headers)
|
|
|
238
263
|
"OpaquePaintImageChannel", # 6.3.7-10
|
|
239
264
|
"QueueAuthenticPixels", # 6.4.5-6
|
|
240
265
|
"RemapImage", # 6.4.4-0
|
|
266
|
+
"RemapImages", # 6.4.4-0
|
|
241
267
|
"RemoveImageArtifact", # 6.3.6
|
|
268
|
+
"RotationalBlurImage", # 6.8.8-9
|
|
269
|
+
"RotationalBlurImageChannel", # 6.8.8-9
|
|
242
270
|
"SelectiveBlurImageChannel", # 6.5.0-3
|
|
243
271
|
"SetImageAlphaChannel", # 6.3.6-9
|
|
244
272
|
"SetImageArtifact", # 6.3.6
|
|
245
273
|
"SetMagickMemoryMethods", # 6.4.1
|
|
246
274
|
"SparseColorImage", # 6.3.6-?
|
|
275
|
+
"StatisticImage", # 6.6.8-6
|
|
247
276
|
"SyncAuthenticPixels", # 6.4.5-6
|
|
248
277
|
"TransformImageColorspace", # 6.5.1
|
|
249
278
|
"TransparentPaintImage", # 6.3.7-10
|
data/ext/RMagick/rmagick.c
CHANGED
|
@@ -33,15 +33,15 @@ VALUE
|
|
|
33
33
|
Magick_colors(VALUE class)
|
|
34
34
|
{
|
|
35
35
|
const ColorInfo **color_info_list;
|
|
36
|
-
|
|
36
|
+
size_t number_colors, x;
|
|
37
37
|
volatile VALUE ary;
|
|
38
|
-
ExceptionInfo exception;
|
|
38
|
+
ExceptionInfo *exception;
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
exception = AcquireExceptionInfo();
|
|
41
41
|
|
|
42
|
-
color_info_list = GetColorInfoList("*", &number_colors,
|
|
42
|
+
color_info_list = GetColorInfoList("*", &number_colors, exception);
|
|
43
43
|
CHECK_EXCEPTION()
|
|
44
|
-
(void) DestroyExceptionInfo(
|
|
44
|
+
(void) DestroyExceptionInfo(exception);
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
if (rb_block_given_p())
|
|
@@ -82,14 +82,14 @@ VALUE
|
|
|
82
82
|
Magick_fonts(VALUE class)
|
|
83
83
|
{
|
|
84
84
|
const TypeInfo **type_info;
|
|
85
|
-
|
|
85
|
+
size_t number_types, x;
|
|
86
86
|
volatile VALUE ary;
|
|
87
|
-
ExceptionInfo exception;
|
|
87
|
+
ExceptionInfo *exception;
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
type_info = GetTypeInfoList("*", &number_types,
|
|
89
|
+
exception = AcquireExceptionInfo();
|
|
90
|
+
type_info = GetTypeInfoList("*", &number_types, exception);
|
|
91
91
|
CHECK_EXCEPTION()
|
|
92
|
-
(void) DestroyExceptionInfo(
|
|
92
|
+
(void) DestroyExceptionInfo(exception);
|
|
93
93
|
|
|
94
94
|
if (rb_block_given_p())
|
|
95
95
|
{
|
|
@@ -166,18 +166,18 @@ VALUE
|
|
|
166
166
|
Magick_init_formats(VALUE class)
|
|
167
167
|
{
|
|
168
168
|
const MagickInfo **magick_info;
|
|
169
|
-
|
|
169
|
+
size_t number_formats, x;
|
|
170
170
|
volatile VALUE formats;
|
|
171
|
-
ExceptionInfo exception;
|
|
171
|
+
ExceptionInfo *exception;
|
|
172
172
|
|
|
173
173
|
class = class; // defeat "never referenced" message from icc
|
|
174
174
|
formats = rb_hash_new();
|
|
175
175
|
|
|
176
176
|
// IM 6.1.3 added an exception argument to GetMagickInfoList
|
|
177
|
-
|
|
178
|
-
magick_info = GetMagickInfoList("*", &number_formats,
|
|
177
|
+
exception = AcquireExceptionInfo();
|
|
178
|
+
magick_info = GetMagickInfoList("*", &number_formats, exception);
|
|
179
179
|
CHECK_EXCEPTION()
|
|
180
|
-
(void) DestroyExceptionInfo(
|
|
180
|
+
(void) DestroyExceptionInfo(exception);
|
|
181
181
|
|
|
182
182
|
|
|
183
183
|
for (x = 0; x < number_formats; x++)
|
data/ext/RMagick/rmagick.h
CHANGED
|
@@ -68,17 +68,17 @@
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
// Handle Quantum <-> Ruby Numeric object conversion
|
|
71
|
-
#if (
|
|
71
|
+
#if (MAGICKCORE_QUANTUM_DEPTH == 8 || MAGICKCORE_QUANTUM_DEPTH == 16)
|
|
72
72
|
#define QUANTUM2NUM(q) INT2FIX((q)) /**< Quantum -> Ruby Numeric conversion */
|
|
73
73
|
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n)) /**< Quantum <- Ruby Numeric conversion */
|
|
74
|
-
#elif (
|
|
74
|
+
#elif (MAGICKCORE_QUANTUM_DEPTH == 32)
|
|
75
75
|
#define QUANTUM2NUM(q) UINT2NUM((q)) /**< Quantum -> Ruby Numeric conversion */
|
|
76
76
|
#define NUM2QUANTUM(n) (Quantum)NUM2UINT((n)) /**< Quntum <- Ruby Numeric conversion */
|
|
77
|
-
#elif (
|
|
77
|
+
#elif (MAGICKCORE_QUANTUM_DEPTH == 64)
|
|
78
78
|
#define QUANTUM2NUM(q) ULL2NUM((q)) /**< Quantum -> Ruby Numeric conversion */
|
|
79
79
|
#define NUM2QUANTUM(n) (Quantum)NUM2ULL((n)) /**< Quntum <- Ruby Numeric conversion */
|
|
80
80
|
#else
|
|
81
|
-
#error Specified
|
|
81
|
+
#error Specified MAGICKCORE_QUANTUM_DEPTH is not supported.
|
|
82
82
|
#endif
|
|
83
83
|
//! Convert user-supplied objects to Quantum
|
|
84
84
|
#define APP2QUANTUM(n) rm_app2quantum((n))
|
|
@@ -457,7 +457,7 @@ EXTERN ID rm_ID_y; /**< "y" */
|
|
|
457
457
|
Handle warnings & errors
|
|
458
458
|
*/
|
|
459
459
|
//! Handle warnings & errors
|
|
460
|
-
#define CHECK_EXCEPTION() rm_check_exception(
|
|
460
|
+
#define CHECK_EXCEPTION() rm_check_exception(exception, NULL, RetainOnError);
|
|
461
461
|
|
|
462
462
|
|
|
463
463
|
/*
|
|
@@ -634,9 +634,9 @@ Pixel_##_cmyk_channel_(VALUE self) \
|
|
|
634
634
|
#define END_ENUM }
|
|
635
635
|
|
|
636
636
|
//! Define a Magick module constant
|
|
637
|
-
#if
|
|
637
|
+
#if MAGICKCORE_QUANTUM_DEPTH == 64
|
|
638
638
|
#define DEF_CONST(constant) rb_define_const(Module_Magick, #constant, ULL2NUM(constant))
|
|
639
|
-
#else //
|
|
639
|
+
#else // MAGICKCORE_QUANTUM_DEPTH == 8, 16, 32
|
|
640
640
|
#define DEF_CONST(constant) rb_define_const(Module_Magick, #constant, UINT2NUM(constant))
|
|
641
641
|
#endif
|
|
642
642
|
|
|
@@ -1075,6 +1075,8 @@ extern VALUE Image_read_inline(VALUE, VALUE);
|
|
|
1075
1075
|
extern VALUE Image_recolor(VALUE, VALUE);
|
|
1076
1076
|
extern VALUE Image_reduce_noise(VALUE, VALUE);
|
|
1077
1077
|
extern VALUE Image_remap(int, VALUE *, VALUE);
|
|
1078
|
+
extern VALUE Image_resample(int, VALUE *, VALUE);
|
|
1079
|
+
extern VALUE Image_resample_bang(int, VALUE *, VALUE);
|
|
1078
1080
|
extern VALUE Image_resize(int, VALUE *, VALUE);
|
|
1079
1081
|
extern VALUE Image_resize_bang(int, VALUE *, VALUE);
|
|
1080
1082
|
extern VALUE Image_roll(VALUE, VALUE, VALUE);
|
data/ext/RMagick/rmdraw.c
CHANGED
|
@@ -501,16 +501,16 @@ image_to_str(Image *image)
|
|
|
501
501
|
unsigned char *blob;
|
|
502
502
|
size_t length;
|
|
503
503
|
Info *info;
|
|
504
|
-
ExceptionInfo exception;
|
|
504
|
+
ExceptionInfo *exception;
|
|
505
505
|
|
|
506
506
|
if (image)
|
|
507
507
|
{
|
|
508
508
|
info = CloneImageInfo(NULL);
|
|
509
|
-
|
|
510
|
-
blob = ImageToBlob(info, image, &length,
|
|
509
|
+
exception = AcquireExceptionInfo();
|
|
510
|
+
blob = ImageToBlob(info, image, &length, exception);
|
|
511
511
|
DestroyImageInfo(info);
|
|
512
512
|
CHECK_EXCEPTION();
|
|
513
|
-
DestroyExceptionInfo(
|
|
513
|
+
DestroyExceptionInfo(exception);
|
|
514
514
|
dimg = rb_str_new((char *)blob, (long)length);
|
|
515
515
|
magick_free((void*)blob);
|
|
516
516
|
}
|
|
@@ -536,16 +536,16 @@ Image *str_to_image(VALUE str)
|
|
|
536
536
|
{
|
|
537
537
|
Image *image = NULL;
|
|
538
538
|
Info *info;
|
|
539
|
-
ExceptionInfo exception;
|
|
539
|
+
ExceptionInfo *exception;
|
|
540
540
|
|
|
541
541
|
if (str != Qnil)
|
|
542
542
|
{
|
|
543
543
|
info = CloneImageInfo(NULL);
|
|
544
|
-
|
|
545
|
-
image = BlobToImage(info, RSTRING_PTR(str), RSTRING_LEN(str),
|
|
544
|
+
exception = AcquireExceptionInfo();
|
|
545
|
+
image = BlobToImage(info, RSTRING_PTR(str), RSTRING_LEN(str), exception);
|
|
546
546
|
DestroyImageInfo(info);
|
|
547
547
|
CHECK_EXCEPTION();
|
|
548
|
-
DestroyExceptionInfo(
|
|
548
|
+
DestroyExceptionInfo(exception);
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
return image;
|
|
@@ -1776,15 +1776,15 @@ VALUE
|
|
|
1776
1776
|
PolaroidOptions_initialize(VALUE self)
|
|
1777
1777
|
{
|
|
1778
1778
|
Draw *draw;
|
|
1779
|
-
ExceptionInfo exception;
|
|
1779
|
+
ExceptionInfo *exception;
|
|
1780
1780
|
|
|
1781
1781
|
// Default shadow color
|
|
1782
1782
|
Data_Get_Struct(self, Draw, draw);
|
|
1783
1783
|
|
|
1784
|
-
|
|
1785
|
-
(void) QueryColorDatabase("gray75", &draw->shadow_color,
|
|
1784
|
+
exception = AcquireExceptionInfo();
|
|
1785
|
+
(void) QueryColorDatabase("gray75", &draw->shadow_color, exception);
|
|
1786
1786
|
CHECK_EXCEPTION()
|
|
1787
|
-
(void) QueryColorDatabase("#dfdfdf", &draw->info->border_color,
|
|
1787
|
+
(void) QueryColorDatabase("#dfdfdf", &draw->info->border_color, exception);
|
|
1788
1788
|
|
|
1789
1789
|
if (rb_block_given_p())
|
|
1790
1790
|
{
|
data/ext/RMagick/rmenum.c
CHANGED
|
@@ -408,8 +408,8 @@ ColorspaceType_new(ColorspaceType cs)
|
|
|
408
408
|
case HSBColorspace:
|
|
409
409
|
name = "HSBColorspace";
|
|
410
410
|
break;
|
|
411
|
-
case
|
|
412
|
-
name = "
|
|
411
|
+
case LabColorspace:
|
|
412
|
+
name = "LabColorspace";
|
|
413
413
|
break;
|
|
414
414
|
case Rec601YCbCrColorspace:
|
|
415
415
|
name = "Rec601YCbCrColorspace";
|