rmagick 2.13.3 → 2.13.4
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.
- checksums.yaml +5 -13
- data/.gitignore +21 -0
- data/.travis.yml +57 -0
- data/CONTRIBUTING.md +22 -0
- data/ChangeLog +47 -4
- data/Gemfile +7 -0
- data/{README.rc → README.textile} +34 -104
- data/Rakefile +160 -24
- data/before_install_linux.sh +12 -0
- data/before_install_osx.sh +2 -0
- data/doc/.cvsignore +1 -0
- data/doc/ex/images/image_with_profile.jpg +0 -0
- data/doc/ex/mask.rb +1 -1
- data/examples/identify.rb +1 -1
- data/ext/RMagick/extconf.rb +60 -23
- 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 +737 -546
- 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.rb +1 -0
- data/lib/rmagick/version.rb +3 -1
- data/lib/rmagick_internal.rb +1964 -0
- data/rmagick.gemspec +14 -5
- data/test/Image2.rb +7 -3
- data/test/Image3.rb +54 -23
- data/test/ImageList2.rb +1 -1
- data/test/Image_attributes.rb +27 -10
- data/test/Import_Export.rb +11 -1
- data/test/Info.rb +4 -4
- data/test/Magick.rb +14 -54
- data/test/Pixel.rb +3 -4
- data/test/{all_basic.rb → test_all_basic.rb} +9 -17
- data/test/tmpnam_test.rb +50 -0
- metadata +50 -21
- data/README +0 -15
- data/README-Mac-OSX.txt +0 -1
- data/build_tarball.rake +0 -215
- data/lib/rvg/to_c.rb +0 -103
- data/metaconfig +0 -7
- data/pkg/rmagick-2.13.3.rc1.gem +0 -0
- 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
@@ -0,0 +1,12 @@
|
|
1
|
+
dpkg --list imagemagick
|
2
|
+
sudo apt-get update
|
3
|
+
sudo apt-get remove imagemagick
|
4
|
+
sudo apt-get install build-essential libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev
|
5
|
+
sudo apt-get build-dep imagemagick
|
6
|
+
wget http://www.imagemagick.org/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.gz
|
7
|
+
tar -xzvf ImageMagick-${IMAGEMAGICK_VERSION}.tar.gz
|
8
|
+
cd ImageMagick-${IMAGEMAGICK_VERSION}
|
9
|
+
./configure --prefix=/usr $CONFIGURE_OPTIONS
|
10
|
+
sudo make install
|
11
|
+
cd ..
|
12
|
+
sudo ldconfig
|
data/doc/.cvsignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
c
|
Binary file
|
data/doc/ex/mask.rb
CHANGED
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/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,30 +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
|
|
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
|
174
|
+
end
|
151
175
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
$LDFLAGS = ENV["LDFLAGS"].to_s + " " + `Magick-config --ldflags`.chomp
|
160
|
-
$LOCAL_LIBS = ENV["LIBS"].to_s + " " + `Magick-config --libs`.chomp
|
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
|
161
183
|
|
162
184
|
elsif RUBY_PLATFORM =~ /mingw/ # mingw
|
163
185
|
|
164
186
|
`convert -version` =~ /Version: ImageMagick (\d+\.\d+\.\d+)-\d+ /
|
165
187
|
abort "Unable to get ImageMagick version" unless $1
|
166
188
|
$magick_version = $1
|
167
|
-
|
189
|
+
if RUBY_PLATFORM =~ /x64/
|
190
|
+
$LOCAL_LIBS = '-lCORE_RL_magick_'
|
191
|
+
else
|
192
|
+
$LOCAL_LIBS = '-lCORE_RL_magick_ -lX11'
|
193
|
+
end
|
168
194
|
|
169
195
|
else # mswin
|
170
196
|
|
@@ -197,10 +223,13 @@ end
|
|
197
223
|
|
198
224
|
if RUBY_PLATFORM !~ /mswin|mingw/
|
199
225
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
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"
|
204
233
|
end
|
205
234
|
end
|
206
235
|
|
@@ -212,15 +241,19 @@ have_func("snprintf", headers)
|
|
212
241
|
"AutoGammaImageChannel", # 6.5.5-1
|
213
242
|
"AutoLevelImageChannel", # 6.5.5-1
|
214
243
|
"BlueShiftImage", # 6.5.4-3
|
244
|
+
"ColorMatrixImage", # 6.6.1-0
|
215
245
|
"ConstituteComponentTerminus", # 6.5.7-9
|
216
246
|
"DeskewImage", # 6.4.2-5
|
247
|
+
"DestroyConstitute", # 6.5.7-9(deprecated)
|
217
248
|
"EncipherImage", # 6.3.8-6
|
218
249
|
"EqualizeImageChannel", # 6.3.6-9
|
250
|
+
"EvaluateImages", # 6.8.6-4
|
219
251
|
"FloodfillPaintImage", # 6.3.7
|
220
252
|
"FunctionImageChannel", # 6.4.8-8
|
221
253
|
"GetAuthenticIndexQueue", # 6.4.5-6
|
222
254
|
"GetAuthenticPixels", # 6.4.5-6
|
223
255
|
"GetImageAlphaChannel", # 6.3.9-2
|
256
|
+
"GetMagickFeatures", # 6.5.7-1
|
224
257
|
"GetVirtualPixels", # 6.4.5-6
|
225
258
|
"LevelImageColors", # 6.4.2
|
226
259
|
"LevelColorsImageChannel", # 6.5.6-4
|
@@ -230,12 +263,16 @@ have_func("snprintf", headers)
|
|
230
263
|
"OpaquePaintImageChannel", # 6.3.7-10
|
231
264
|
"QueueAuthenticPixels", # 6.4.5-6
|
232
265
|
"RemapImage", # 6.4.4-0
|
266
|
+
"RemapImages", # 6.4.4-0
|
233
267
|
"RemoveImageArtifact", # 6.3.6
|
268
|
+
"RotationalBlurImage", # 6.8.8-9
|
269
|
+
"RotationalBlurImageChannel", # 6.8.8-9
|
234
270
|
"SelectiveBlurImageChannel", # 6.5.0-3
|
235
271
|
"SetImageAlphaChannel", # 6.3.6-9
|
236
272
|
"SetImageArtifact", # 6.3.6
|
237
273
|
"SetMagickMemoryMethods", # 6.4.1
|
238
274
|
"SparseColorImage", # 6.3.6-?
|
275
|
+
"StatisticImage", # 6.6.8-6
|
239
276
|
"SyncAuthenticPixels", # 6.4.5-6
|
240
277
|
"TransformImageColorspace", # 6.5.1
|
241
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";
|
data/ext/RMagick/rmfill.c
CHANGED
@@ -120,9 +120,9 @@ point_fill(
|
|
120
120
|
unsigned long x, y;
|
121
121
|
MagickRealType red_step, green_step, blue_step;
|
122
122
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
123
|
-
ExceptionInfo exception;
|
123
|
+
ExceptionInfo *exception;
|
124
124
|
|
125
|
-
|
125
|
+
exception = AcquireExceptionInfo();
|
126
126
|
#endif
|
127
127
|
|
128
128
|
steps = sqrt((double)((image->columns-x0)*(image->columns-x0)
|
@@ -137,7 +137,7 @@ point_fill(
|
|
137
137
|
PixelPacket *row_pixels;
|
138
138
|
|
139
139
|
#if defined(HAVE_QUEUEAUTHENTICPIXELS)
|
140
|
-
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1,
|
140
|
+
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, exception);
|
141
141
|
CHECK_EXCEPTION()
|
142
142
|
#else
|
143
143
|
row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
|
@@ -153,7 +153,7 @@ point_fill(
|
|
153
153
|
}
|
154
154
|
|
155
155
|
#if defined(HAVE_SYNCAUTHENTICPIXELS)
|
156
|
-
SyncAuthenticPixels(image,
|
156
|
+
SyncAuthenticPixels(image, exception);
|
157
157
|
CHECK_EXCEPTION()
|
158
158
|
#else
|
159
159
|
SyncImagePixels(image);
|
@@ -162,7 +162,7 @@ point_fill(
|
|
162
162
|
}
|
163
163
|
|
164
164
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
165
|
-
DestroyExceptionInfo(
|
165
|
+
DestroyExceptionInfo(exception);
|
166
166
|
#endif
|
167
167
|
}
|
168
168
|
|
@@ -189,9 +189,9 @@ vertical_fill(
|
|
189
189
|
PixelPacket *master;
|
190
190
|
MagickRealType red_step, green_step, blue_step;
|
191
191
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
192
|
-
ExceptionInfo exception;
|
192
|
+
ExceptionInfo *exception;
|
193
193
|
|
194
|
-
|
194
|
+
exception = AcquireExceptionInfo();
|
195
195
|
#endif
|
196
196
|
|
197
197
|
steps = FMAX(x1, ((long)image->columns)-x1);
|
@@ -227,7 +227,7 @@ vertical_fill(
|
|
227
227
|
PixelPacket *row_pixels;
|
228
228
|
|
229
229
|
#if defined(HAVE_QUEUEAUTHENTICPIXELS)
|
230
|
-
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1,
|
230
|
+
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, exception);
|
231
231
|
CHECK_EXCEPTION()
|
232
232
|
#else
|
233
233
|
row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
|
@@ -237,7 +237,7 @@ vertical_fill(
|
|
237
237
|
memcpy(row_pixels, master, image->columns * sizeof(PixelPacket));
|
238
238
|
|
239
239
|
#if defined(HAVE_SYNCAUTHENTICPIXELS)
|
240
|
-
SyncAuthenticPixels(image,
|
240
|
+
SyncAuthenticPixels(image, exception);
|
241
241
|
CHECK_EXCEPTION()
|
242
242
|
#else
|
243
243
|
SyncImagePixels(image);
|
@@ -246,7 +246,7 @@ vertical_fill(
|
|
246
246
|
}
|
247
247
|
|
248
248
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
249
|
-
DestroyExceptionInfo(
|
249
|
+
DestroyExceptionInfo(exception);
|
250
250
|
#endif
|
251
251
|
|
252
252
|
xfree((void *)master);
|
@@ -274,9 +274,9 @@ horizontal_fill(
|
|
274
274
|
PixelPacket *master;
|
275
275
|
MagickRealType red_step, green_step, blue_step;
|
276
276
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
277
|
-
ExceptionInfo exception;
|
277
|
+
ExceptionInfo *exception;
|
278
278
|
|
279
|
-
|
279
|
+
exception = AcquireExceptionInfo();
|
280
280
|
#endif
|
281
281
|
|
282
282
|
steps = FMAX(y1, ((long)image->rows)-y1);
|
@@ -310,7 +310,7 @@ horizontal_fill(
|
|
310
310
|
PixelPacket *col_pixels;
|
311
311
|
|
312
312
|
#if defined(HAVE_QUEUEAUTHENTICPIXELS)
|
313
|
-
col_pixels = QueueAuthenticPixels(image, (long int)x, 0, 1, image->rows,
|
313
|
+
col_pixels = QueueAuthenticPixels(image, (long int)x, 0, 1, image->rows, exception);
|
314
314
|
#else
|
315
315
|
col_pixels = SetImagePixels(image, (long int)x, 0, 1, image->rows);
|
316
316
|
rm_check_image_exception(image, RetainOnError);
|
@@ -318,7 +318,7 @@ horizontal_fill(
|
|
318
318
|
memcpy(col_pixels, master, image->rows * sizeof(PixelPacket));
|
319
319
|
|
320
320
|
#if defined(HAVE_SYNCAUTHENTICPIXELS)
|
321
|
-
SyncAuthenticPixels(image,
|
321
|
+
SyncAuthenticPixels(image, exception);
|
322
322
|
CHECK_EXCEPTION()
|
323
323
|
#else
|
324
324
|
SyncImagePixels(image);
|
@@ -327,7 +327,7 @@ horizontal_fill(
|
|
327
327
|
}
|
328
328
|
|
329
329
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
330
|
-
DestroyExceptionInfo(
|
330
|
+
DestroyExceptionInfo(exception);
|
331
331
|
#endif
|
332
332
|
|
333
333
|
xfree((PixelPacket *)master);
|
@@ -362,9 +362,9 @@ v_diagonal_fill(
|
|
362
362
|
double m, b, steps = 0.0;
|
363
363
|
double d1, d2;
|
364
364
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
365
|
-
ExceptionInfo exception;
|
365
|
+
ExceptionInfo *exception;
|
366
366
|
|
367
|
-
|
367
|
+
exception = AcquireExceptionInfo();
|
368
368
|
#endif
|
369
369
|
|
370
370
|
// Compute the equation of the line: y=mx+b
|
@@ -408,7 +408,7 @@ v_diagonal_fill(
|
|
408
408
|
PixelPacket *row_pixels;
|
409
409
|
|
410
410
|
#if defined(HAVE_QUEUEAUTHENTICPIXELS)
|
411
|
-
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1,
|
411
|
+
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, exception);
|
412
412
|
CHECK_EXCEPTION()
|
413
413
|
#else
|
414
414
|
row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
|
@@ -424,7 +424,7 @@ v_diagonal_fill(
|
|
424
424
|
}
|
425
425
|
|
426
426
|
#if defined(HAVE_SYNCAUTHENTICPIXELS)
|
427
|
-
SyncAuthenticPixels(image,
|
427
|
+
SyncAuthenticPixels(image, exception);
|
428
428
|
CHECK_EXCEPTION()
|
429
429
|
#else
|
430
430
|
SyncImagePixels(image);
|
@@ -433,7 +433,7 @@ v_diagonal_fill(
|
|
433
433
|
}
|
434
434
|
|
435
435
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
436
|
-
DestroyExceptionInfo(
|
436
|
+
DestroyExceptionInfo(exception);
|
437
437
|
#endif
|
438
438
|
|
439
439
|
}
|
@@ -467,9 +467,9 @@ h_diagonal_fill(
|
|
467
467
|
MagickRealType red_step, green_step, blue_step;
|
468
468
|
double d1, d2;
|
469
469
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
470
|
-
ExceptionInfo exception;
|
470
|
+
ExceptionInfo *exception;
|
471
471
|
|
472
|
-
|
472
|
+
exception = AcquireExceptionInfo();
|
473
473
|
#endif
|
474
474
|
|
475
475
|
// Compute the equation of the line: y=mx+b
|
@@ -515,7 +515,7 @@ h_diagonal_fill(
|
|
515
515
|
PixelPacket *row_pixels;
|
516
516
|
|
517
517
|
#if defined(HAVE_QUEUEAUTHENTICPIXELS)
|
518
|
-
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1,
|
518
|
+
row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, exception);
|
519
519
|
CHECK_EXCEPTION()
|
520
520
|
#else
|
521
521
|
row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
|
@@ -531,7 +531,7 @@ h_diagonal_fill(
|
|
531
531
|
}
|
532
532
|
|
533
533
|
#if defined(HAVE_SYNCAUTHENTICPIXELS)
|
534
|
-
SyncAuthenticPixels(image,
|
534
|
+
SyncAuthenticPixels(image, exception);
|
535
535
|
CHECK_EXCEPTION()
|
536
536
|
#else
|
537
537
|
SyncImagePixels(image);
|
@@ -540,7 +540,7 @@ h_diagonal_fill(
|
|
540
540
|
}
|
541
541
|
|
542
542
|
#if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
|
543
|
-
DestroyExceptionInfo(
|
543
|
+
DestroyExceptionInfo(exception);
|
544
544
|
#endif
|
545
545
|
}
|
546
546
|
|