rmagick 5.3.0 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.devcontainer/setup-user.sh +1 -1
- data/.editorconfig +1 -1
- data/.github/workflows/ci.yml +20 -16
- data/.gitignore +1 -0
- data/.yardopts +1 -1
- data/CHANGELOG.md +13 -0
- data/before_install_osx.sh +1 -1
- data/ext/RMagick/extconf.rb +19 -12
- data/ext/RMagick/{rmagick.c → rmagick.cpp} +19 -22
- data/ext/RMagick/rmagick.h +70 -49
- data/ext/RMagick/{rmdraw.c → rmdraw.cpp} +25 -24
- data/ext/RMagick/{rmenum.c → rmenum.cpp} +42 -42
- data/ext/RMagick/{rmfill.c → rmfill.cpp} +6 -6
- data/ext/RMagick/{rmilist.c → rmilist.cpp} +23 -21
- data/ext/RMagick/{rmimage.c → rmimage.cpp} +202 -157
- data/ext/RMagick/{rminfo.c → rminfo.cpp} +11 -11
- data/ext/RMagick/{rmkinfo.c → rmkinfo.cpp} +4 -9
- data/ext/RMagick/rmmain.cpp +1957 -0
- data/ext/RMagick/{rmmontage.c → rmmontage.cpp} +5 -5
- data/ext/RMagick/{rmpixel.c → rmpixel.cpp} +40 -41
- data/ext/RMagick/{rmstruct.c → rmstruct.cpp} +6 -6
- data/ext/RMagick/{rmutil.c → rmutil.cpp} +33 -13
- data/lib/rmagick/version.rb +1 -1
- data/rmagick.gemspec +1 -0
- metadata +30 -16
- data/ext/RMagick/rmmain.c +0 -1955
@@ -0,0 +1,1957 @@
|
|
1
|
+
/**************************************************************************//**
|
2
|
+
* Contains all module, class, method declarations. Defines all constants.
|
3
|
+
* Contains Magick module methods.
|
4
|
+
*
|
5
|
+
* Copyright © 2002 - 2009 by Timothy P. Hunter
|
6
|
+
*
|
7
|
+
* Changes since Nov. 2009 copyright © by Benjamin Thomas and Omer Bar-or
|
8
|
+
*
|
9
|
+
* @file rmmain.cpp
|
10
|
+
* @version $Id: rmmain.cpp,v 1.303 2009/12/20 02:33:33 baror Exp $
|
11
|
+
* @author Tim Hunter
|
12
|
+
******************************************************************************/
|
13
|
+
|
14
|
+
#define MAIN // Define external variables
|
15
|
+
#include "rmagick.h"
|
16
|
+
|
17
|
+
#if defined(HAVE_SETMAGICKALIGNEDMEMORYMETHODS) && defined(HAVE_RB_GC_ADJUST_MEMORY_USAGE)
|
18
|
+
#if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE__ALIGNED_MSIZE)
|
19
|
+
#define USE_RM_ALIGNED_MALLOC 1
|
20
|
+
|
21
|
+
#if defined(HAVE_MALLOC_H)
|
22
|
+
#include <malloc.h>
|
23
|
+
#elif defined(HAVE_MALLOC_MALLOC_H)
|
24
|
+
#include <malloc/malloc.h>
|
25
|
+
#endif
|
26
|
+
#endif
|
27
|
+
#endif
|
28
|
+
|
29
|
+
/*----------------------------------------------------------------------------\
|
30
|
+
| External declarations
|
31
|
+
\----------------------------------------------------------------------------*/
|
32
|
+
void Init_RMagick(void);
|
33
|
+
|
34
|
+
static void test_Magick_version(void);
|
35
|
+
static void version_constants(void);
|
36
|
+
static void features_constant(void);
|
37
|
+
|
38
|
+
|
39
|
+
/*
|
40
|
+
* Enum constants - define a subclass of Enum for the specified enumeration.
|
41
|
+
* Define an instance of the subclass for each member in the enumeration.
|
42
|
+
* Initialize each instance with its name and value.
|
43
|
+
*/
|
44
|
+
//! define Ruby enum
|
45
|
+
#define DEF_ENUM(tag) {\
|
46
|
+
VALUE _klass, _enum;\
|
47
|
+
_klass = Class_##tag = rm_define_enum_type(#tag);
|
48
|
+
|
49
|
+
//! define Ruby enumerator elements
|
50
|
+
#define ENUMERATOR(val)\
|
51
|
+
_enum = rm_enum_new(_klass, ID2SYM(rb_intern(#val)), INT2NUM(val));\
|
52
|
+
rb_define_const(Module_Magick, #val, _enum);
|
53
|
+
|
54
|
+
//! define Ruby enumerator elements when name is different from the value
|
55
|
+
#define ENUMERATORV(name, val)\
|
56
|
+
_enum = rm_enum_new(_klass, ID2SYM(rb_intern(#name)), INT2NUM(val));\
|
57
|
+
rb_define_const(Module_Magick, #name, _enum);
|
58
|
+
|
59
|
+
//! end of an enumerator
|
60
|
+
#define END_ENUM }
|
61
|
+
|
62
|
+
/*
|
63
|
+
* Handle transferring ImageMagick memory allocations/frees to Ruby.
|
64
|
+
* These functions have the same signature as the equivalent C functions.
|
65
|
+
*/
|
66
|
+
|
67
|
+
/**
|
68
|
+
* Allocate memory.
|
69
|
+
*
|
70
|
+
* No Ruby usage (internal function)
|
71
|
+
*
|
72
|
+
* @param size the size of memory to allocate
|
73
|
+
* @return pointer to a block of memory
|
74
|
+
*/
|
75
|
+
static void *rm_malloc(size_t size)
|
76
|
+
{
|
77
|
+
return xmalloc((long)size);
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Reallocate memory.
|
85
|
+
*
|
86
|
+
* No Ruby usage (internal function)
|
87
|
+
*
|
88
|
+
* @param ptr pointer to the existing block of memory
|
89
|
+
* @param size the new size of memory to allocate
|
90
|
+
* @return pointer to a block of memory
|
91
|
+
*/
|
92
|
+
static void *rm_realloc(void *ptr, size_t size)
|
93
|
+
{
|
94
|
+
return xrealloc(ptr, (long)size);
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Free memory.
|
102
|
+
*
|
103
|
+
* No Ruby usage (internal function)
|
104
|
+
*
|
105
|
+
* @param ptr pointer to the existing block of memory
|
106
|
+
*/
|
107
|
+
static void rm_free(void *ptr)
|
108
|
+
{
|
109
|
+
xfree(ptr);
|
110
|
+
}
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
#if USE_RM_ALIGNED_MALLOC
|
115
|
+
|
116
|
+
static size_t
|
117
|
+
rm_aligned_malloc_size(void *ptr)
|
118
|
+
{
|
119
|
+
#if defined(HAVE_MALLOC_USABLE_SIZE)
|
120
|
+
return malloc_usable_size(ptr);
|
121
|
+
#elif defined(HAVE_MALLOC_SIZE)
|
122
|
+
return malloc_size(ptr);
|
123
|
+
#elif defined(HAVE__ALIGNED_MSIZE)
|
124
|
+
// Refered to https://github.com/ImageMagick/ImageMagick/blob/master/MagickCore/memory-private.h
|
125
|
+
#define MAGICKCORE_SIZEOF_VOID_P 8
|
126
|
+
#define CACHE_LINE_SIZE (8 * MAGICKCORE_SIZEOF_VOID_P)
|
127
|
+
size_t _aligned_msize(void *memblock, size_t alignment, size_t offset);
|
128
|
+
return _aligned_msize(ptr, CACHE_LINE_SIZE, 0);
|
129
|
+
#endif
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Allocate aligned memory.
|
135
|
+
*
|
136
|
+
* No Ruby usage (internal function)
|
137
|
+
*
|
138
|
+
* @param size the size of memory to allocate
|
139
|
+
* @return pointer to a block of memory
|
140
|
+
*/
|
141
|
+
static void *rm_aligned_malloc(size_t size, size_t alignment)
|
142
|
+
{
|
143
|
+
void *res;
|
144
|
+
size_t allocated_size;
|
145
|
+
|
146
|
+
#if defined(HAVE_POSIX_MEMALIGN)
|
147
|
+
if (posix_memalign(&res, alignment, size) != 0) {
|
148
|
+
return NULL;
|
149
|
+
}
|
150
|
+
#elif defined(HAVE__ALIGNED_MSIZE)
|
151
|
+
res = _aligned_malloc(size, alignment);
|
152
|
+
#endif
|
153
|
+
|
154
|
+
allocated_size = rm_aligned_malloc_size(res);
|
155
|
+
rb_gc_adjust_memory_usage(allocated_size);
|
156
|
+
return res;
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Free aligned memory.
|
164
|
+
*
|
165
|
+
* No Ruby usage (internal function)
|
166
|
+
*
|
167
|
+
* @param ptr pointer to the existing block of memory
|
168
|
+
*/
|
169
|
+
static void rm_aligned_free(void *ptr)
|
170
|
+
{
|
171
|
+
size_t allocated_size = rm_aligned_malloc_size(ptr);
|
172
|
+
rb_gc_adjust_memory_usage(-allocated_size);
|
173
|
+
|
174
|
+
#if defined(HAVE_POSIX_MEMALIGN)
|
175
|
+
free(ptr);
|
176
|
+
#elif defined(HAVE__ALIGNED_MSIZE)
|
177
|
+
_aligned_free(ptr);
|
178
|
+
#endif
|
179
|
+
}
|
180
|
+
|
181
|
+
#endif
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Use managed memory.
|
187
|
+
*
|
188
|
+
* No Ruby usage (internal function)
|
189
|
+
*/
|
190
|
+
static inline void managed_memory_enable(VALUE enable)
|
191
|
+
{
|
192
|
+
if (enable)
|
193
|
+
{
|
194
|
+
SetMagickMemoryMethods(rm_malloc, rm_realloc, rm_free);
|
195
|
+
#if USE_RM_ALIGNED_MALLOC
|
196
|
+
SetMagickAlignedMemoryMethods(rm_aligned_malloc, rm_aligned_free);
|
197
|
+
#endif
|
198
|
+
}
|
199
|
+
rb_define_const(Module_Magick, "MANAGED_MEMORY", enable);
|
200
|
+
}
|
201
|
+
|
202
|
+
static void set_managed_memory(void)
|
203
|
+
{
|
204
|
+
char *disable = getenv("RMAGICK_DISABLE_MANAGED_MEMORY");
|
205
|
+
|
206
|
+
if (disable)
|
207
|
+
{
|
208
|
+
managed_memory_enable(Qfalse);
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
|
212
|
+
#if defined(_WIN32)
|
213
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_9_0)
|
214
|
+
managed_memory_enable(Qtrue);
|
215
|
+
#else
|
216
|
+
// Disable managed memory feature with ImageMagick 6.8.x or below because causes crash.
|
217
|
+
// Refer https://ci.appveyor.com/project/mockdeep/rmagick/builds/24706171
|
218
|
+
managed_memory_enable(Qfalse);
|
219
|
+
#endif
|
220
|
+
#else
|
221
|
+
// Not Windows
|
222
|
+
managed_memory_enable(Qtrue);
|
223
|
+
#endif
|
224
|
+
}
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Define the classes and constants.
|
231
|
+
*
|
232
|
+
* No Ruby usage (internal function)
|
233
|
+
*/
|
234
|
+
void
|
235
|
+
Init_RMagick2(void)
|
236
|
+
{
|
237
|
+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
238
|
+
rb_ext_ractor_safe(true);
|
239
|
+
#endif
|
240
|
+
|
241
|
+
Module_Magick = rb_define_module("Magick");
|
242
|
+
|
243
|
+
set_managed_memory();
|
244
|
+
|
245
|
+
MagickCoreGenesis("RMagick", MagickFalse);
|
246
|
+
|
247
|
+
test_Magick_version();
|
248
|
+
|
249
|
+
/*-----------------------------------------------------------------------*/
|
250
|
+
/* Create IDs for frequently used methods, etc. */
|
251
|
+
/*-----------------------------------------------------------------------*/
|
252
|
+
|
253
|
+
rm_ID_call = rb_intern("call");
|
254
|
+
rm_ID_changed = rb_intern("changed");
|
255
|
+
rm_ID_cur_image = rb_intern("cur_image");
|
256
|
+
rm_ID_dup = rb_intern("dup");
|
257
|
+
rm_ID_fill = rb_intern("fill");
|
258
|
+
rm_ID_Geometry = rb_intern("Geometry");
|
259
|
+
rm_ID_height = rb_intern("height");
|
260
|
+
rm_ID_initialize_copy = rb_intern("initialize_copy");
|
261
|
+
rm_ID_notify_observers = rb_intern("notify_observers");
|
262
|
+
rm_ID_new = rb_intern("new");
|
263
|
+
rm_ID_push = rb_intern("push");
|
264
|
+
rm_ID_values = rb_intern("values");
|
265
|
+
rm_ID_width = rb_intern("width");
|
266
|
+
|
267
|
+
/*-----------------------------------------------------------------------*/
|
268
|
+
/* Module Magick methods */
|
269
|
+
/*-----------------------------------------------------------------------*/
|
270
|
+
|
271
|
+
rb_define_module_function(Module_Magick, "colors", RUBY_METHOD_FUNC(Magick_colors), 0);
|
272
|
+
rb_define_module_function(Module_Magick, "fonts", RUBY_METHOD_FUNC(Magick_fonts), 0);
|
273
|
+
rb_define_module_function(Module_Magick, "init_formats", RUBY_METHOD_FUNC(Magick_init_formats), 0);
|
274
|
+
rb_define_module_function(Module_Magick, "limit_resource", RUBY_METHOD_FUNC(Magick_limit_resource), -1);
|
275
|
+
rb_define_module_function(Module_Magick, "set_cache_threshold", RUBY_METHOD_FUNC(Magick_set_cache_threshold), 1);
|
276
|
+
rb_define_module_function(Module_Magick, "set_log_event_mask", RUBY_METHOD_FUNC(Magick_set_log_event_mask), -1);
|
277
|
+
rb_define_module_function(Module_Magick, "set_log_format", RUBY_METHOD_FUNC(Magick_set_log_format), 1);
|
278
|
+
|
279
|
+
/*-----------------------------------------------------------------------*/
|
280
|
+
/* Class Magick::Image methods */
|
281
|
+
/*-----------------------------------------------------------------------*/
|
282
|
+
|
283
|
+
Class_Image = rb_define_class_under(Module_Magick, "Image", rb_cObject);
|
284
|
+
|
285
|
+
// Define an alias for Object#display before we override it
|
286
|
+
rb_define_alias(Class_Image, "__display__", "display");
|
287
|
+
|
288
|
+
rb_define_alloc_func(Class_Image, Image_alloc);
|
289
|
+
rb_define_method(Class_Image, "initialize", RUBY_METHOD_FUNC(Image_initialize), -1);
|
290
|
+
|
291
|
+
rb_define_singleton_method(Class_Image, "constitute", RUBY_METHOD_FUNC(Image_constitute), 4);
|
292
|
+
rb_define_singleton_method(Class_Image, "_load", RUBY_METHOD_FUNC(Image__load), 1);
|
293
|
+
rb_define_singleton_method(Class_Image, "capture", RUBY_METHOD_FUNC(Image_capture), -1);
|
294
|
+
rb_define_singleton_method(Class_Image, "ping", RUBY_METHOD_FUNC(Image_ping), 1);
|
295
|
+
rb_define_singleton_method(Class_Image, "read", RUBY_METHOD_FUNC(Image_read), 1);
|
296
|
+
rb_define_singleton_method(Class_Image, "read_inline", RUBY_METHOD_FUNC(Image_read_inline), 1);
|
297
|
+
rb_define_singleton_method(Class_Image, "from_blob", RUBY_METHOD_FUNC(Image_from_blob), 1);
|
298
|
+
|
299
|
+
// Define the attributes
|
300
|
+
rb_define_method(Class_Image, "background_color", RUBY_METHOD_FUNC(Image_background_color), 0);
|
301
|
+
rb_define_method(Class_Image, "background_color=", RUBY_METHOD_FUNC(Image_background_color_eq), 1);
|
302
|
+
rb_define_method(Class_Image, "base_columns", RUBY_METHOD_FUNC(Image_base_columns), 0);
|
303
|
+
rb_define_method(Class_Image, "base_filename", RUBY_METHOD_FUNC(Image_base_filename), 0);
|
304
|
+
rb_define_method(Class_Image, "base_rows", RUBY_METHOD_FUNC(Image_base_rows), 0);
|
305
|
+
rb_define_method(Class_Image, "bias", RUBY_METHOD_FUNC(Image_bias), 0);
|
306
|
+
rb_define_method(Class_Image, "bias=", RUBY_METHOD_FUNC(Image_bias_eq), 1);
|
307
|
+
rb_define_method(Class_Image, "black_point_compensation", RUBY_METHOD_FUNC(Image_black_point_compensation), 0);
|
308
|
+
rb_define_method(Class_Image, "black_point_compensation=", RUBY_METHOD_FUNC(Image_black_point_compensation_eq), 1);
|
309
|
+
rb_define_method(Class_Image, "border_color", RUBY_METHOD_FUNC(Image_border_color), 0);
|
310
|
+
rb_define_method(Class_Image, "border_color=", RUBY_METHOD_FUNC(Image_border_color_eq), 1);
|
311
|
+
rb_define_method(Class_Image, "bounding_box", RUBY_METHOD_FUNC(Image_bounding_box), 0);
|
312
|
+
rb_define_method(Class_Image, "chromaticity", RUBY_METHOD_FUNC(Image_chromaticity), 0);
|
313
|
+
rb_define_method(Class_Image, "chromaticity=", RUBY_METHOD_FUNC(Image_chromaticity_eq), 1);
|
314
|
+
rb_define_method(Class_Image, "color_profile", RUBY_METHOD_FUNC(Image_color_profile), 0);
|
315
|
+
rb_define_method(Class_Image, "color_profile=", RUBY_METHOD_FUNC(Image_color_profile_eq), 1);
|
316
|
+
rb_define_method(Class_Image, "colors", RUBY_METHOD_FUNC(Image_colors), 0);
|
317
|
+
rb_define_method(Class_Image, "colorspace", RUBY_METHOD_FUNC(Image_colorspace), 0);
|
318
|
+
rb_define_method(Class_Image, "colorspace=", RUBY_METHOD_FUNC(Image_colorspace_eq), 1);
|
319
|
+
rb_define_method(Class_Image, "columns", RUBY_METHOD_FUNC(Image_columns), 0);
|
320
|
+
rb_define_method(Class_Image, "compose", RUBY_METHOD_FUNC(Image_compose), 0);
|
321
|
+
rb_define_method(Class_Image, "compose=", RUBY_METHOD_FUNC(Image_compose_eq), 1);
|
322
|
+
rb_define_method(Class_Image, "compression", RUBY_METHOD_FUNC(Image_compression), 0);
|
323
|
+
rb_define_method(Class_Image, "compression=", RUBY_METHOD_FUNC(Image_compression_eq), 1);
|
324
|
+
rb_define_method(Class_Image, "delay", RUBY_METHOD_FUNC(Image_delay), 0);
|
325
|
+
rb_define_method(Class_Image, "delay=", RUBY_METHOD_FUNC(Image_delay_eq), 1);
|
326
|
+
rb_define_method(Class_Image, "density", RUBY_METHOD_FUNC(Image_density), 0);
|
327
|
+
rb_define_method(Class_Image, "density=", RUBY_METHOD_FUNC(Image_density_eq), 1);
|
328
|
+
rb_define_method(Class_Image, "depth", RUBY_METHOD_FUNC(Image_depth), 0);
|
329
|
+
rb_define_method(Class_Image, "directory", RUBY_METHOD_FUNC(Image_directory), 0);
|
330
|
+
rb_define_method(Class_Image, "dispose", RUBY_METHOD_FUNC(Image_dispose), 0);
|
331
|
+
rb_define_method(Class_Image, "dispose=", RUBY_METHOD_FUNC(Image_dispose_eq), 1);
|
332
|
+
rb_define_method(Class_Image, "endian", RUBY_METHOD_FUNC(Image_endian), 0);
|
333
|
+
rb_define_method(Class_Image, "endian=", RUBY_METHOD_FUNC(Image_endian_eq), 1);
|
334
|
+
rb_define_method(Class_Image, "extract_info", RUBY_METHOD_FUNC(Image_extract_info), 0);
|
335
|
+
rb_define_method(Class_Image, "extract_info=", RUBY_METHOD_FUNC(Image_extract_info_eq), 1);
|
336
|
+
rb_define_method(Class_Image, "filename", RUBY_METHOD_FUNC(Image_filename), 0);
|
337
|
+
rb_define_method(Class_Image, "filesize", RUBY_METHOD_FUNC(Image_filesize), 0);
|
338
|
+
rb_define_method(Class_Image, "filter", RUBY_METHOD_FUNC(Image_filter), 0);
|
339
|
+
rb_define_method(Class_Image, "filter=", RUBY_METHOD_FUNC(Image_filter_eq), 1);
|
340
|
+
rb_define_method(Class_Image, "format", RUBY_METHOD_FUNC(Image_format), 0);
|
341
|
+
rb_define_method(Class_Image, "format=", RUBY_METHOD_FUNC(Image_format_eq), 1);
|
342
|
+
rb_define_method(Class_Image, "fuzz", RUBY_METHOD_FUNC(Image_fuzz), 0);
|
343
|
+
rb_define_method(Class_Image, "fuzz=", RUBY_METHOD_FUNC(Image_fuzz_eq), 1);
|
344
|
+
rb_define_method(Class_Image, "gamma", RUBY_METHOD_FUNC(Image_gamma), 0);
|
345
|
+
rb_define_method(Class_Image, "gamma=", RUBY_METHOD_FUNC(Image_gamma_eq), 1);
|
346
|
+
rb_define_method(Class_Image, "geometry", RUBY_METHOD_FUNC(Image_geometry), 0);
|
347
|
+
rb_define_method(Class_Image, "geometry=", RUBY_METHOD_FUNC(Image_geometry_eq), 1);
|
348
|
+
rb_define_method(Class_Image, "gravity", RUBY_METHOD_FUNC(Image_gravity), 0);
|
349
|
+
rb_define_method(Class_Image, "gravity=", RUBY_METHOD_FUNC(Image_gravity_eq), 1);
|
350
|
+
rb_define_method(Class_Image, "image_type", RUBY_METHOD_FUNC(Image_image_type), 0);
|
351
|
+
rb_define_method(Class_Image, "image_type=", RUBY_METHOD_FUNC(Image_image_type_eq), 1);
|
352
|
+
rb_define_method(Class_Image, "interlace", RUBY_METHOD_FUNC(Image_interlace), 0);
|
353
|
+
rb_define_method(Class_Image, "interlace=", RUBY_METHOD_FUNC(Image_interlace_eq), 1);
|
354
|
+
rb_define_method(Class_Image, "iptc_profile", RUBY_METHOD_FUNC(Image_iptc_profile), 0);
|
355
|
+
rb_define_method(Class_Image, "iptc_profile=", RUBY_METHOD_FUNC(Image_iptc_profile_eq), 1);
|
356
|
+
rb_define_method(Class_Image, "iterations", RUBY_METHOD_FUNC(Image_iterations), 0); // do not document! Only used by Image#iterations=
|
357
|
+
rb_define_method(Class_Image, "iterations=", RUBY_METHOD_FUNC(Image_iterations_eq), 1); // do not document! Only used by Image#iterations=
|
358
|
+
rb_define_method(Class_Image, "matte_color", RUBY_METHOD_FUNC(Image_matte_color), 0);
|
359
|
+
rb_define_method(Class_Image, "matte_color=", RUBY_METHOD_FUNC(Image_matte_color_eq), 1);
|
360
|
+
rb_define_method(Class_Image, "mean_error_per_pixel", RUBY_METHOD_FUNC(Image_mean_error_per_pixel), 0);
|
361
|
+
rb_define_method(Class_Image, "mime_type", RUBY_METHOD_FUNC(Image_mime_type), 0);
|
362
|
+
rb_define_method(Class_Image, "montage", RUBY_METHOD_FUNC(Image_montage), 0);
|
363
|
+
rb_define_method(Class_Image, "normalized_mean_error", RUBY_METHOD_FUNC(Image_normalized_mean_error), 0);
|
364
|
+
rb_define_method(Class_Image, "normalized_maximum_error", RUBY_METHOD_FUNC(Image_normalized_maximum_error), 0);
|
365
|
+
rb_define_method(Class_Image, "number_colors", RUBY_METHOD_FUNC(Image_number_colors), 0);
|
366
|
+
rb_define_method(Class_Image, "offset", RUBY_METHOD_FUNC(Image_offset), 0);
|
367
|
+
rb_define_method(Class_Image, "offset=", RUBY_METHOD_FUNC(Image_offset_eq), 1);
|
368
|
+
rb_define_method(Class_Image, "orientation", RUBY_METHOD_FUNC(Image_orientation), 0);
|
369
|
+
rb_define_method(Class_Image, "orientation=", RUBY_METHOD_FUNC(Image_orientation_eq), 1);
|
370
|
+
rb_define_method(Class_Image, "page", RUBY_METHOD_FUNC(Image_page), 0);
|
371
|
+
rb_define_method(Class_Image, "page=", RUBY_METHOD_FUNC(Image_page_eq), 1);
|
372
|
+
rb_define_method(Class_Image, "pixel_interpolation_method", RUBY_METHOD_FUNC(Image_pixel_interpolation_method), 0);
|
373
|
+
rb_define_method(Class_Image, "pixel_interpolation_method=", RUBY_METHOD_FUNC(Image_pixel_interpolation_method_eq), 1);
|
374
|
+
rb_define_method(Class_Image, "quality", RUBY_METHOD_FUNC(Image_quality), 0);
|
375
|
+
rb_define_method(Class_Image, "quantum_depth", RUBY_METHOD_FUNC(Image_quantum_depth), 0);
|
376
|
+
rb_define_method(Class_Image, "rendering_intent", RUBY_METHOD_FUNC(Image_rendering_intent), 0);
|
377
|
+
rb_define_method(Class_Image, "rendering_intent=", RUBY_METHOD_FUNC(Image_rendering_intent_eq), 1);
|
378
|
+
rb_define_method(Class_Image, "rows", RUBY_METHOD_FUNC(Image_rows), 0);
|
379
|
+
rb_define_method(Class_Image, "scene", RUBY_METHOD_FUNC(Image_scene), 0);
|
380
|
+
rb_define_method(Class_Image, "start_loop", RUBY_METHOD_FUNC(Image_start_loop), 0);
|
381
|
+
rb_define_method(Class_Image, "start_loop=", RUBY_METHOD_FUNC(Image_start_loop_eq), 1);
|
382
|
+
rb_define_method(Class_Image, "class_type", RUBY_METHOD_FUNC(Image_class_type), 0);
|
383
|
+
rb_define_method(Class_Image, "class_type=", RUBY_METHOD_FUNC(Image_class_type_eq), 1);
|
384
|
+
rb_define_method(Class_Image, "ticks_per_second", RUBY_METHOD_FUNC(Image_ticks_per_second), 0);
|
385
|
+
rb_define_method(Class_Image, "ticks_per_second=", RUBY_METHOD_FUNC(Image_ticks_per_second_eq), 1);
|
386
|
+
rb_define_method(Class_Image, "total_colors", RUBY_METHOD_FUNC(Image_total_colors), 0);
|
387
|
+
rb_define_method(Class_Image, "total_ink_density", RUBY_METHOD_FUNC(Image_total_ink_density), 0);
|
388
|
+
rb_define_method(Class_Image, "transparent_color", RUBY_METHOD_FUNC(Image_transparent_color), 0);
|
389
|
+
rb_define_method(Class_Image, "transparent_color=", RUBY_METHOD_FUNC(Image_transparent_color_eq), 1);
|
390
|
+
rb_define_method(Class_Image, "units", RUBY_METHOD_FUNC(Image_units), 0);
|
391
|
+
rb_define_method(Class_Image, "units=", RUBY_METHOD_FUNC(Image_units_eq), 1);
|
392
|
+
rb_define_method(Class_Image, "virtual_pixel_method", RUBY_METHOD_FUNC(Image_virtual_pixel_method), 0);
|
393
|
+
rb_define_method(Class_Image, "virtual_pixel_method=", RUBY_METHOD_FUNC(Image_virtual_pixel_method_eq), 1);
|
394
|
+
rb_define_method(Class_Image, "x_resolution", RUBY_METHOD_FUNC(Image_x_resolution), 0);
|
395
|
+
rb_define_method(Class_Image, "x_resolution=", RUBY_METHOD_FUNC(Image_x_resolution_eq), 1);
|
396
|
+
rb_define_method(Class_Image, "y_resolution", RUBY_METHOD_FUNC(Image_y_resolution), 0);
|
397
|
+
rb_define_method(Class_Image, "y_resolution=", RUBY_METHOD_FUNC(Image_y_resolution_eq), 1);
|
398
|
+
|
399
|
+
rb_define_method(Class_Image, "adaptive_blur", RUBY_METHOD_FUNC(Image_adaptive_blur), -1);
|
400
|
+
rb_define_method(Class_Image, "adaptive_blur_channel", RUBY_METHOD_FUNC(Image_adaptive_blur_channel), -1);
|
401
|
+
rb_define_method(Class_Image, "adaptive_resize", RUBY_METHOD_FUNC(Image_adaptive_resize), -1);
|
402
|
+
rb_define_method(Class_Image, "adaptive_sharpen", RUBY_METHOD_FUNC(Image_adaptive_sharpen), -1);
|
403
|
+
rb_define_method(Class_Image, "adaptive_sharpen_channel", RUBY_METHOD_FUNC(Image_adaptive_sharpen_channel), -1);
|
404
|
+
rb_define_method(Class_Image, "adaptive_threshold", RUBY_METHOD_FUNC(Image_adaptive_threshold), -1);
|
405
|
+
rb_define_method(Class_Image, "add_compose_mask", RUBY_METHOD_FUNC(Image_add_compose_mask), 1);
|
406
|
+
rb_define_method(Class_Image, "add_noise", RUBY_METHOD_FUNC(Image_add_noise), 1);
|
407
|
+
rb_define_method(Class_Image, "add_noise_channel", RUBY_METHOD_FUNC(Image_add_noise_channel), -1);
|
408
|
+
rb_define_method(Class_Image, "add_profile", RUBY_METHOD_FUNC(Image_add_profile), 1);
|
409
|
+
rb_define_method(Class_Image, "affine_transform", RUBY_METHOD_FUNC(Image_affine_transform), 1);
|
410
|
+
rb_define_method(Class_Image, "remap", RUBY_METHOD_FUNC(Image_remap), -1);
|
411
|
+
rb_define_method(Class_Image, "alpha", RUBY_METHOD_FUNC(Image_alpha), -1);
|
412
|
+
rb_define_method(Class_Image, "alpha?", RUBY_METHOD_FUNC(Image_alpha_q), 0);
|
413
|
+
rb_define_method(Class_Image, "[]", RUBY_METHOD_FUNC(Image_aref), 1);
|
414
|
+
rb_define_method(Class_Image, "[]=", RUBY_METHOD_FUNC(Image_aset), 2);
|
415
|
+
rb_define_method(Class_Image, "auto_gamma_channel", RUBY_METHOD_FUNC(Image_auto_gamma_channel), -1);
|
416
|
+
rb_define_method(Class_Image, "auto_level_channel", RUBY_METHOD_FUNC(Image_auto_level_channel), -1);
|
417
|
+
rb_define_method(Class_Image, "auto_orient", RUBY_METHOD_FUNC(Image_auto_orient), 0);
|
418
|
+
rb_define_method(Class_Image, "auto_orient!", RUBY_METHOD_FUNC(Image_auto_orient_bang), 0);
|
419
|
+
rb_define_method(Class_Image, "properties", RUBY_METHOD_FUNC(Image_properties), 0);
|
420
|
+
rb_define_method(Class_Image, "bilevel_channel", RUBY_METHOD_FUNC(Image_bilevel_channel), -1);
|
421
|
+
rb_define_method(Class_Image, "black_threshold", RUBY_METHOD_FUNC(Image_black_threshold), -1);
|
422
|
+
rb_define_method(Class_Image, "blend", RUBY_METHOD_FUNC(Image_blend), -1);
|
423
|
+
rb_define_method(Class_Image, "blue_shift", RUBY_METHOD_FUNC(Image_blue_shift), -1);
|
424
|
+
rb_define_method(Class_Image, "blur_image", RUBY_METHOD_FUNC(Image_blur_image), -1);
|
425
|
+
rb_define_method(Class_Image, "blur_channel", RUBY_METHOD_FUNC(Image_blur_channel), -1);
|
426
|
+
rb_define_method(Class_Image, "border", RUBY_METHOD_FUNC(Image_border), 3);
|
427
|
+
rb_define_method(Class_Image, "border!", RUBY_METHOD_FUNC(Image_border_bang), 3);
|
428
|
+
rb_define_method(Class_Image, "change_geometry", RUBY_METHOD_FUNC(Image_change_geometry), 1);
|
429
|
+
rb_define_method(Class_Image, "change_geometry!", RUBY_METHOD_FUNC(Image_change_geometry), 1);
|
430
|
+
rb_define_method(Class_Image, "changed?", RUBY_METHOD_FUNC(Image_changed_q), 0);
|
431
|
+
rb_define_method(Class_Image, "channel", RUBY_METHOD_FUNC(Image_channel), 1);
|
432
|
+
// An alias for compare_channel
|
433
|
+
rb_define_method(Class_Image, "channel_compare", RUBY_METHOD_FUNC(Image_compare_channel), -1);
|
434
|
+
rb_define_method(Class_Image, "check_destroyed", RUBY_METHOD_FUNC(Image_check_destroyed), 0);
|
435
|
+
rb_define_method(Class_Image, "compare_channel", RUBY_METHOD_FUNC(Image_compare_channel), -1);
|
436
|
+
rb_define_method(Class_Image, "channel_depth", RUBY_METHOD_FUNC(Image_channel_depth), -1);
|
437
|
+
rb_define_method(Class_Image, "channel_extrema", RUBY_METHOD_FUNC(Image_channel_extrema), -1);
|
438
|
+
rb_define_method(Class_Image, "channel_mean", RUBY_METHOD_FUNC(Image_channel_mean), -1);
|
439
|
+
rb_define_method(Class_Image, "channel_entropy", RUBY_METHOD_FUNC(Image_channel_entropy), -1);
|
440
|
+
rb_define_method(Class_Image, "charcoal", RUBY_METHOD_FUNC(Image_charcoal), -1);
|
441
|
+
rb_define_method(Class_Image, "chop", RUBY_METHOD_FUNC(Image_chop), 4);
|
442
|
+
rb_define_method(Class_Image, "clut_channel", RUBY_METHOD_FUNC(Image_clut_channel), -1);
|
443
|
+
rb_define_method(Class_Image, "clone", RUBY_METHOD_FUNC(Image_clone), 0);
|
444
|
+
rb_define_method(Class_Image, "color_flood_fill", RUBY_METHOD_FUNC(Image_color_flood_fill), 5);
|
445
|
+
rb_define_method(Class_Image, "color_histogram", RUBY_METHOD_FUNC(Image_color_histogram), 0);
|
446
|
+
rb_define_method(Class_Image, "colorize", RUBY_METHOD_FUNC(Image_colorize), -1);
|
447
|
+
rb_define_method(Class_Image, "colormap", RUBY_METHOD_FUNC(Image_colormap), -1);
|
448
|
+
rb_define_method(Class_Image, "composite", RUBY_METHOD_FUNC(Image_composite), -1);
|
449
|
+
rb_define_method(Class_Image, "composite!", RUBY_METHOD_FUNC(Image_composite_bang), -1);
|
450
|
+
rb_define_method(Class_Image, "composite_affine", RUBY_METHOD_FUNC(Image_composite_affine), 2);
|
451
|
+
rb_define_method(Class_Image, "composite_channel", RUBY_METHOD_FUNC(Image_composite_channel), -1);
|
452
|
+
rb_define_method(Class_Image, "composite_channel!", RUBY_METHOD_FUNC(Image_composite_channel_bang), -1);
|
453
|
+
rb_define_method(Class_Image, "composite_mathematics", RUBY_METHOD_FUNC(Image_composite_mathematics), -1);
|
454
|
+
rb_define_method(Class_Image, "composite_tiled", RUBY_METHOD_FUNC(Image_composite_tiled), -1);
|
455
|
+
rb_define_method(Class_Image, "composite_tiled!", RUBY_METHOD_FUNC(Image_composite_tiled_bang), -1);
|
456
|
+
rb_define_method(Class_Image, "compress_colormap!", RUBY_METHOD_FUNC(Image_compress_colormap_bang), 0);
|
457
|
+
rb_define_method(Class_Image, "contrast", RUBY_METHOD_FUNC(Image_contrast), -1);
|
458
|
+
rb_define_method(Class_Image, "contrast_stretch_channel", RUBY_METHOD_FUNC(Image_contrast_stretch_channel), -1);
|
459
|
+
rb_define_method(Class_Image, "convolve", RUBY_METHOD_FUNC(Image_convolve), 2);
|
460
|
+
rb_define_method(Class_Image, "convolve_channel", RUBY_METHOD_FUNC(Image_convolve_channel), -1);
|
461
|
+
rb_define_method(Class_Image, "morphology", RUBY_METHOD_FUNC(Image_morphology), 3);
|
462
|
+
rb_define_method(Class_Image, "morphology_channel", RUBY_METHOD_FUNC(Image_morphology_channel), 4);
|
463
|
+
rb_define_method(Class_Image, "copy", RUBY_METHOD_FUNC(Image_copy), 0);
|
464
|
+
rb_define_method(Class_Image, "crop", RUBY_METHOD_FUNC(Image_crop), -1);
|
465
|
+
rb_define_method(Class_Image, "crop!", RUBY_METHOD_FUNC(Image_crop_bang), -1);
|
466
|
+
rb_define_method(Class_Image, "cycle_colormap", RUBY_METHOD_FUNC(Image_cycle_colormap), 1);
|
467
|
+
rb_define_method(Class_Image, "decipher", RUBY_METHOD_FUNC(Image_decipher), 1);
|
468
|
+
rb_define_method(Class_Image, "define", RUBY_METHOD_FUNC(Image_define), 2);
|
469
|
+
rb_define_method(Class_Image, "deskew", RUBY_METHOD_FUNC(Image_deskew), -1);
|
470
|
+
rb_define_method(Class_Image, "delete_compose_mask", RUBY_METHOD_FUNC(Image_delete_compose_mask), 0);
|
471
|
+
rb_define_method(Class_Image, "delete_profile", RUBY_METHOD_FUNC(Image_delete_profile), 1);
|
472
|
+
rb_define_method(Class_Image, "despeckle", RUBY_METHOD_FUNC(Image_despeckle), 0);
|
473
|
+
rb_define_method(Class_Image, "destroy!", RUBY_METHOD_FUNC(Image_destroy_bang), 0);
|
474
|
+
rb_define_method(Class_Image, "destroyed?", RUBY_METHOD_FUNC(Image_destroyed_q), 0);
|
475
|
+
rb_define_method(Class_Image, "difference", RUBY_METHOD_FUNC(Image_difference), 1);
|
476
|
+
rb_define_method(Class_Image, "dispatch", RUBY_METHOD_FUNC(Image_dispatch), -1);
|
477
|
+
rb_define_method(Class_Image, "displace", RUBY_METHOD_FUNC(Image_displace), -1);
|
478
|
+
rb_define_method(Class_Image, "display", RUBY_METHOD_FUNC(Image_display), 0);
|
479
|
+
rb_define_method(Class_Image, "dissolve", RUBY_METHOD_FUNC(Image_dissolve), -1);
|
480
|
+
rb_define_method(Class_Image, "distort", RUBY_METHOD_FUNC(Image_distort), -1);
|
481
|
+
rb_define_method(Class_Image, "distortion_channel", RUBY_METHOD_FUNC(Image_distortion_channel), -1);
|
482
|
+
rb_define_method(Class_Image, "_dump", RUBY_METHOD_FUNC(Image__dump), 1);
|
483
|
+
rb_define_method(Class_Image, "dup", RUBY_METHOD_FUNC(Image_dup), 0);
|
484
|
+
rb_define_method(Class_Image, "each_profile", RUBY_METHOD_FUNC(Image_each_profile), 0);
|
485
|
+
rb_define_method(Class_Image, "edge", RUBY_METHOD_FUNC(Image_edge), -1);
|
486
|
+
rb_define_method(Class_Image, "emboss", RUBY_METHOD_FUNC(Image_emboss), -1);
|
487
|
+
rb_define_method(Class_Image, "encipher", RUBY_METHOD_FUNC(Image_encipher), 1);
|
488
|
+
rb_define_method(Class_Image, "enhance", RUBY_METHOD_FUNC(Image_enhance), 0);
|
489
|
+
rb_define_method(Class_Image, "equalize", RUBY_METHOD_FUNC(Image_equalize), 0);
|
490
|
+
rb_define_method(Class_Image, "equalize_channel", RUBY_METHOD_FUNC(Image_equalize_channel), -1);
|
491
|
+
rb_define_method(Class_Image, "erase!", RUBY_METHOD_FUNC(Image_erase_bang), 0);
|
492
|
+
rb_define_method(Class_Image, "excerpt", RUBY_METHOD_FUNC(Image_excerpt), 4);
|
493
|
+
rb_define_method(Class_Image, "excerpt!", RUBY_METHOD_FUNC(Image_excerpt_bang), 4);
|
494
|
+
rb_define_method(Class_Image, "export_pixels", RUBY_METHOD_FUNC(Image_export_pixels), -1);
|
495
|
+
rb_define_method(Class_Image, "export_pixels_to_str", RUBY_METHOD_FUNC(Image_export_pixels_to_str), -1);
|
496
|
+
rb_define_method(Class_Image, "extent", RUBY_METHOD_FUNC(Image_extent), -1);
|
497
|
+
rb_define_method(Class_Image, "find_similar_region", RUBY_METHOD_FUNC(Image_find_similar_region), -1);
|
498
|
+
rb_define_method(Class_Image, "flip", RUBY_METHOD_FUNC(Image_flip), 0);
|
499
|
+
rb_define_method(Class_Image, "flip!", RUBY_METHOD_FUNC(Image_flip_bang), 0);
|
500
|
+
rb_define_method(Class_Image, "flop", RUBY_METHOD_FUNC(Image_flop), 0);
|
501
|
+
rb_define_method(Class_Image, "flop!", RUBY_METHOD_FUNC(Image_flop_bang), 0);
|
502
|
+
rb_define_method(Class_Image, "frame", RUBY_METHOD_FUNC(Image_frame), -1);
|
503
|
+
rb_define_method(Class_Image, "function_channel", RUBY_METHOD_FUNC(Image_function_channel), -1);
|
504
|
+
rb_define_method(Class_Image, "fx", RUBY_METHOD_FUNC(Image_fx), -1);
|
505
|
+
rb_define_method(Class_Image, "gamma_channel", RUBY_METHOD_FUNC(Image_gamma_channel), -1);
|
506
|
+
rb_define_method(Class_Image, "gamma_correct", RUBY_METHOD_FUNC(Image_gamma_correct), -1);
|
507
|
+
rb_define_method(Class_Image, "gaussian_blur", RUBY_METHOD_FUNC(Image_gaussian_blur), -1);
|
508
|
+
rb_define_method(Class_Image, "gaussian_blur_channel", RUBY_METHOD_FUNC(Image_gaussian_blur_channel), -1);
|
509
|
+
rb_define_method(Class_Image, "get_pixels", RUBY_METHOD_FUNC(Image_get_pixels), 4);
|
510
|
+
rb_define_method(Class_Image, "gray?", RUBY_METHOD_FUNC(Image_gray_q), 0);
|
511
|
+
rb_define_method(Class_Image, "grey?", RUBY_METHOD_FUNC(Image_gray_q), 0);
|
512
|
+
rb_define_method(Class_Image, "histogram?", RUBY_METHOD_FUNC(Image_histogram_q), 0);
|
513
|
+
rb_define_method(Class_Image, "implode", RUBY_METHOD_FUNC(Image_implode), -1);
|
514
|
+
rb_define_method(Class_Image, "import_pixels", RUBY_METHOD_FUNC(Image_import_pixels), -1);
|
515
|
+
rb_define_method(Class_Image, "initialize_copy", RUBY_METHOD_FUNC(Image_init_copy), 1);
|
516
|
+
rb_define_method(Class_Image, "inspect", RUBY_METHOD_FUNC(Image_inspect), 0);
|
517
|
+
rb_define_method(Class_Image, "level2", RUBY_METHOD_FUNC(Image_level2), -1);
|
518
|
+
rb_define_method(Class_Image, "level_channel", RUBY_METHOD_FUNC(Image_level_channel), -1);
|
519
|
+
rb_define_method(Class_Image, "level_colors", RUBY_METHOD_FUNC(Image_level_colors), -1);
|
520
|
+
rb_define_method(Class_Image, "levelize_channel", RUBY_METHOD_FUNC(Image_levelize_channel), -1);
|
521
|
+
rb_define_method(Class_Image, "linear_stretch", RUBY_METHOD_FUNC(Image_linear_stretch), -1);
|
522
|
+
rb_define_method(Class_Image, "liquid_rescale", RUBY_METHOD_FUNC(Image_liquid_rescale), -1);
|
523
|
+
rb_define_method(Class_Image, "magnify", RUBY_METHOD_FUNC(Image_magnify), 0);
|
524
|
+
rb_define_method(Class_Image, "magnify!", RUBY_METHOD_FUNC(Image_magnify_bang), 0);
|
525
|
+
rb_define_method(Class_Image, "marshal_dump", RUBY_METHOD_FUNC(Image_marshal_dump), 0);
|
526
|
+
rb_define_method(Class_Image, "marshal_load", RUBY_METHOD_FUNC(Image_marshal_load), 1);
|
527
|
+
rb_define_method(Class_Image, "mask", RUBY_METHOD_FUNC(Image_mask), -1);
|
528
|
+
rb_define_method(Class_Image, "matte_flood_fill", RUBY_METHOD_FUNC(Image_matte_flood_fill), -1);
|
529
|
+
rb_define_method(Class_Image, "median_filter", RUBY_METHOD_FUNC(Image_median_filter), -1);
|
530
|
+
rb_define_method(Class_Image, "minify", RUBY_METHOD_FUNC(Image_minify), 0);
|
531
|
+
rb_define_method(Class_Image, "minify!", RUBY_METHOD_FUNC(Image_minify_bang), 0);
|
532
|
+
rb_define_method(Class_Image, "modulate", RUBY_METHOD_FUNC(Image_modulate), -1);
|
533
|
+
rb_define_method(Class_Image, "monochrome?", RUBY_METHOD_FUNC(Image_monochrome_q), 0);
|
534
|
+
rb_define_method(Class_Image, "motion_blur", RUBY_METHOD_FUNC(Image_motion_blur), -1);
|
535
|
+
rb_define_method(Class_Image, "negate", RUBY_METHOD_FUNC(Image_negate), -1);
|
536
|
+
rb_define_method(Class_Image, "negate_channel", RUBY_METHOD_FUNC(Image_negate_channel), -1);
|
537
|
+
rb_define_method(Class_Image, "normalize", RUBY_METHOD_FUNC(Image_normalize), 0);
|
538
|
+
rb_define_method(Class_Image, "normalize_channel", RUBY_METHOD_FUNC(Image_normalize_channel), -1);
|
539
|
+
rb_define_method(Class_Image, "oil_paint", RUBY_METHOD_FUNC(Image_oil_paint), -1);
|
540
|
+
rb_define_method(Class_Image, "opaque", RUBY_METHOD_FUNC(Image_opaque), 2);
|
541
|
+
rb_define_method(Class_Image, "opaque_channel", RUBY_METHOD_FUNC(Image_opaque_channel), -1);
|
542
|
+
rb_define_method(Class_Image, "opaque?", RUBY_METHOD_FUNC(Image_opaque_q), 0);
|
543
|
+
rb_define_method(Class_Image, "ordered_dither", RUBY_METHOD_FUNC(Image_ordered_dither), -1);
|
544
|
+
rb_define_method(Class_Image, "paint_transparent", RUBY_METHOD_FUNC(Image_paint_transparent), -1);
|
545
|
+
rb_define_method(Class_Image, "palette?", RUBY_METHOD_FUNC(Image_palette_q), 0);
|
546
|
+
rb_define_method(Class_Image, "pixel_color", RUBY_METHOD_FUNC(Image_pixel_color), -1);
|
547
|
+
rb_define_method(Class_Image, "polaroid", RUBY_METHOD_FUNC(Image_polaroid), -1);
|
548
|
+
rb_define_method(Class_Image, "posterize", RUBY_METHOD_FUNC(Image_posterize), -1);
|
549
|
+
// rb_define_method(Class_Image, "plasma", RUBY_METHOD_FUNC(Image_plasma), 6);
|
550
|
+
rb_define_method(Class_Image, "preview", RUBY_METHOD_FUNC(Image_preview), 1);
|
551
|
+
rb_define_method(Class_Image, "profile!", RUBY_METHOD_FUNC(Image_profile_bang), 2);
|
552
|
+
rb_define_method(Class_Image, "quantize", RUBY_METHOD_FUNC(Image_quantize), -1);
|
553
|
+
rb_define_method(Class_Image, "quantum_operator", RUBY_METHOD_FUNC(Image_quantum_operator), -1);
|
554
|
+
rb_define_method(Class_Image, "radial_blur", RUBY_METHOD_FUNC(Image_radial_blur), 1);
|
555
|
+
rb_define_method(Class_Image, "radial_blur_channel", RUBY_METHOD_FUNC(Image_radial_blur_channel), -1);
|
556
|
+
rb_define_method(Class_Image, "raise", RUBY_METHOD_FUNC(Image_raise), -1);
|
557
|
+
rb_define_method(Class_Image, "random_threshold_channel", RUBY_METHOD_FUNC(Image_random_threshold_channel), -1);
|
558
|
+
rb_define_method(Class_Image, "recolor", RUBY_METHOD_FUNC(Image_recolor), 1);
|
559
|
+
rb_define_method(Class_Image, "reduce_noise", RUBY_METHOD_FUNC(Image_reduce_noise), 1);
|
560
|
+
rb_define_method(Class_Image, "resample", RUBY_METHOD_FUNC(Image_resample), -1);
|
561
|
+
rb_define_method(Class_Image, "resample!", RUBY_METHOD_FUNC(Image_resample_bang), -1);
|
562
|
+
rb_define_method(Class_Image, "resize", RUBY_METHOD_FUNC(Image_resize), -1);
|
563
|
+
rb_define_method(Class_Image, "resize!", RUBY_METHOD_FUNC(Image_resize_bang), -1);
|
564
|
+
rb_define_method(Class_Image, "roll", RUBY_METHOD_FUNC(Image_roll), 2);
|
565
|
+
rb_define_method(Class_Image, "rotate", RUBY_METHOD_FUNC(Image_rotate), -1);
|
566
|
+
rb_define_method(Class_Image, "rotate!", RUBY_METHOD_FUNC(Image_rotate_bang), -1);
|
567
|
+
rb_define_method(Class_Image, "sample", RUBY_METHOD_FUNC(Image_sample), -1);
|
568
|
+
rb_define_method(Class_Image, "sample!", RUBY_METHOD_FUNC(Image_sample_bang), -1);
|
569
|
+
rb_define_method(Class_Image, "scale", RUBY_METHOD_FUNC(Image_scale), -1);
|
570
|
+
rb_define_method(Class_Image, "scale!", RUBY_METHOD_FUNC(Image_scale_bang), -1);
|
571
|
+
rb_define_method(Class_Image, "segment", RUBY_METHOD_FUNC(Image_segment), -1);
|
572
|
+
rb_define_method(Class_Image, "selective_blur_channel", RUBY_METHOD_FUNC(Image_selective_blur_channel), -1);
|
573
|
+
rb_define_method(Class_Image, "separate", RUBY_METHOD_FUNC(Image_separate), -1);
|
574
|
+
rb_define_method(Class_Image, "sepiatone", RUBY_METHOD_FUNC(Image_sepiatone), -1);
|
575
|
+
rb_define_method(Class_Image, "set_channel_depth", RUBY_METHOD_FUNC(Image_set_channel_depth), 2);
|
576
|
+
rb_define_method(Class_Image, "shade", RUBY_METHOD_FUNC(Image_shade), -1);
|
577
|
+
rb_define_method(Class_Image, "shadow", RUBY_METHOD_FUNC(Image_shadow), -1);
|
578
|
+
rb_define_method(Class_Image, "sharpen", RUBY_METHOD_FUNC(Image_sharpen), -1);
|
579
|
+
rb_define_method(Class_Image, "sharpen_channel", RUBY_METHOD_FUNC(Image_sharpen_channel), -1);
|
580
|
+
rb_define_method(Class_Image, "shave", RUBY_METHOD_FUNC(Image_shave), 2);
|
581
|
+
rb_define_method(Class_Image, "shave!", RUBY_METHOD_FUNC(Image_shave_bang), 2);
|
582
|
+
rb_define_method(Class_Image, "shear", RUBY_METHOD_FUNC(Image_shear), 2);
|
583
|
+
rb_define_method(Class_Image, "sigmoidal_contrast_channel", RUBY_METHOD_FUNC(Image_sigmoidal_contrast_channel), -1);
|
584
|
+
rb_define_method(Class_Image, "signature", RUBY_METHOD_FUNC(Image_signature), 0);
|
585
|
+
rb_define_method(Class_Image, "sketch", RUBY_METHOD_FUNC(Image_sketch), -1);
|
586
|
+
rb_define_method(Class_Image, "solarize", RUBY_METHOD_FUNC(Image_solarize), -1);
|
587
|
+
rb_define_method(Class_Image, "<=>", RUBY_METHOD_FUNC(Image_spaceship), 1);
|
588
|
+
rb_define_method(Class_Image, "sparse_color", RUBY_METHOD_FUNC(Image_sparse_color), -1);
|
589
|
+
rb_define_method(Class_Image, "splice", RUBY_METHOD_FUNC(Image_splice), -1);
|
590
|
+
rb_define_method(Class_Image, "spread", RUBY_METHOD_FUNC(Image_spread), -1);
|
591
|
+
rb_define_method(Class_Image, "stegano", RUBY_METHOD_FUNC(Image_stegano), 2);
|
592
|
+
rb_define_method(Class_Image, "stereo", RUBY_METHOD_FUNC(Image_stereo), 1);
|
593
|
+
rb_define_method(Class_Image, "strip!", RUBY_METHOD_FUNC(Image_strip_bang), 0);
|
594
|
+
rb_define_method(Class_Image, "store_pixels", RUBY_METHOD_FUNC(Image_store_pixels), 5);
|
595
|
+
rb_define_method(Class_Image, "swirl", RUBY_METHOD_FUNC(Image_swirl), 1);
|
596
|
+
rb_define_method(Class_Image, "texture_flood_fill", RUBY_METHOD_FUNC(Image_texture_flood_fill), 5);
|
597
|
+
rb_define_method(Class_Image, "threshold", RUBY_METHOD_FUNC(Image_threshold), 1);
|
598
|
+
rb_define_method(Class_Image, "thumbnail", RUBY_METHOD_FUNC(Image_thumbnail), -1);
|
599
|
+
rb_define_method(Class_Image, "thumbnail!", RUBY_METHOD_FUNC(Image_thumbnail_bang), -1);
|
600
|
+
rb_define_method(Class_Image, "tint", RUBY_METHOD_FUNC(Image_tint), -1);
|
601
|
+
rb_define_method(Class_Image, "to_color", RUBY_METHOD_FUNC(Image_to_color), 1);
|
602
|
+
rb_define_method(Class_Image, "to_blob", RUBY_METHOD_FUNC(Image_to_blob), 0);
|
603
|
+
rb_define_method(Class_Image, "transparent", RUBY_METHOD_FUNC(Image_transparent), -1);
|
604
|
+
rb_define_method(Class_Image, "transparent_chroma", RUBY_METHOD_FUNC(Image_transparent_chroma), -1);
|
605
|
+
rb_define_method(Class_Image, "transpose", RUBY_METHOD_FUNC(Image_transpose), 0);
|
606
|
+
rb_define_method(Class_Image, "transpose!", RUBY_METHOD_FUNC(Image_transpose_bang), 0);
|
607
|
+
rb_define_method(Class_Image, "transverse", RUBY_METHOD_FUNC(Image_transverse), 0);
|
608
|
+
rb_define_method(Class_Image, "transverse!", RUBY_METHOD_FUNC(Image_transverse_bang), 0);
|
609
|
+
rb_define_method(Class_Image, "trim", RUBY_METHOD_FUNC(Image_trim), -1);
|
610
|
+
rb_define_method(Class_Image, "trim!", RUBY_METHOD_FUNC(Image_trim_bang), -1);
|
611
|
+
rb_define_method(Class_Image, "undefine", RUBY_METHOD_FUNC(Image_undefine), 1);
|
612
|
+
rb_define_method(Class_Image, "unique_colors", RUBY_METHOD_FUNC(Image_unique_colors), 0);
|
613
|
+
rb_define_method(Class_Image, "unsharp_mask", RUBY_METHOD_FUNC(Image_unsharp_mask), -1);
|
614
|
+
rb_define_method(Class_Image, "unsharp_mask_channel", RUBY_METHOD_FUNC(Image_unsharp_mask_channel), -1);
|
615
|
+
rb_define_method(Class_Image, "vignette", RUBY_METHOD_FUNC(Image_vignette), -1);
|
616
|
+
rb_define_method(Class_Image, "watermark", RUBY_METHOD_FUNC(Image_watermark), -1);
|
617
|
+
rb_define_method(Class_Image, "wave", RUBY_METHOD_FUNC(Image_wave), -1);
|
618
|
+
rb_define_method(Class_Image, "wet_floor", RUBY_METHOD_FUNC(Image_wet_floor), -1);
|
619
|
+
rb_define_method(Class_Image, "white_threshold", RUBY_METHOD_FUNC(Image_white_threshold), -1);
|
620
|
+
rb_define_method(Class_Image, "write", RUBY_METHOD_FUNC(Image_write), 1);
|
621
|
+
|
622
|
+
/*-----------------------------------------------------------------------*/
|
623
|
+
/* Class Magick::ImageList methods */
|
624
|
+
/*-----------------------------------------------------------------------*/
|
625
|
+
|
626
|
+
Class_ImageList = rb_define_class_under(Module_Magick, "ImageList", rb_cObject);
|
627
|
+
|
628
|
+
// Define an alias for Object#display before we override it
|
629
|
+
rb_define_alias(Class_ImageList, "__display__", "display");
|
630
|
+
rb_define_method(Class_ImageList, "remap", RUBY_METHOD_FUNC(ImageList_remap), -1);
|
631
|
+
rb_define_method(Class_ImageList, "animate", RUBY_METHOD_FUNC(ImageList_animate), -1);
|
632
|
+
rb_define_method(Class_ImageList, "append", RUBY_METHOD_FUNC(ImageList_append), 1);
|
633
|
+
rb_define_method(Class_ImageList, "average", RUBY_METHOD_FUNC(ImageList_average), 0);
|
634
|
+
rb_define_method(Class_ImageList, "coalesce", RUBY_METHOD_FUNC(ImageList_coalesce), 0);
|
635
|
+
rb_define_method(Class_ImageList, "combine", RUBY_METHOD_FUNC(ImageList_combine), -1);
|
636
|
+
rb_define_method(Class_ImageList, "composite_layers", RUBY_METHOD_FUNC(ImageList_composite_layers), -1);
|
637
|
+
rb_define_method(Class_ImageList, "deconstruct", RUBY_METHOD_FUNC(ImageList_deconstruct), 0);
|
638
|
+
rb_define_method(Class_ImageList, "display", RUBY_METHOD_FUNC(ImageList_display), 0);
|
639
|
+
rb_define_method(Class_ImageList, "flatten_images", RUBY_METHOD_FUNC(ImageList_flatten_images), 0);
|
640
|
+
rb_define_method(Class_ImageList, "montage", RUBY_METHOD_FUNC(ImageList_montage), 0);
|
641
|
+
rb_define_method(Class_ImageList, "morph", RUBY_METHOD_FUNC(ImageList_morph), 1);
|
642
|
+
rb_define_method(Class_ImageList, "mosaic", RUBY_METHOD_FUNC(ImageList_mosaic), 0);
|
643
|
+
rb_define_method(Class_ImageList, "optimize_layers", RUBY_METHOD_FUNC(ImageList_optimize_layers), 1);
|
644
|
+
rb_define_method(Class_ImageList, "quantize", RUBY_METHOD_FUNC(ImageList_quantize), -1);
|
645
|
+
rb_define_method(Class_ImageList, "to_blob", RUBY_METHOD_FUNC(ImageList_to_blob), 0);
|
646
|
+
rb_define_method(Class_ImageList, "write", RUBY_METHOD_FUNC(ImageList_write), 1);
|
647
|
+
|
648
|
+
/*-----------------------------------------------------------------------*/
|
649
|
+
/* Class Magick::Draw methods */
|
650
|
+
/*-----------------------------------------------------------------------*/
|
651
|
+
|
652
|
+
Class_Draw = rb_define_class_under(Module_Magick, "Draw", rb_cObject);
|
653
|
+
rb_define_alloc_func(Class_Draw, Draw_alloc);
|
654
|
+
|
655
|
+
// Define the attributes
|
656
|
+
rb_define_method(Class_Draw, "affine=", RUBY_METHOD_FUNC(Draw_affine_eq), 1);
|
657
|
+
rb_define_method(Class_Draw, "align=", RUBY_METHOD_FUNC(Draw_align_eq), 1);
|
658
|
+
rb_define_method(Class_Draw, "decorate=", RUBY_METHOD_FUNC(Draw_decorate_eq), 1);
|
659
|
+
rb_define_method(Class_Draw, "density=", RUBY_METHOD_FUNC(Draw_density_eq), 1);
|
660
|
+
rb_define_method(Class_Draw, "encoding=", RUBY_METHOD_FUNC(Draw_encoding_eq), 1);
|
661
|
+
rb_define_method(Class_Draw, "fill=", RUBY_METHOD_FUNC(Draw_fill_eq), 1);
|
662
|
+
rb_define_method(Class_Draw, "fill_pattern=", RUBY_METHOD_FUNC(Draw_fill_pattern_eq), 1);
|
663
|
+
rb_define_method(Class_Draw, "font=", RUBY_METHOD_FUNC(Draw_font_eq), 1);
|
664
|
+
rb_define_method(Class_Draw, "font_family=", RUBY_METHOD_FUNC(Draw_font_family_eq), 1);
|
665
|
+
rb_define_method(Class_Draw, "font_stretch=", RUBY_METHOD_FUNC(Draw_font_stretch_eq), 1);
|
666
|
+
rb_define_method(Class_Draw, "font_style=", RUBY_METHOD_FUNC(Draw_font_style_eq), 1);
|
667
|
+
rb_define_method(Class_Draw, "font_weight=", RUBY_METHOD_FUNC(Draw_font_weight_eq), 1);
|
668
|
+
rb_define_method(Class_Draw, "gravity=", RUBY_METHOD_FUNC(Draw_gravity_eq), 1);
|
669
|
+
rb_define_method(Class_Draw, "interline_spacing=", RUBY_METHOD_FUNC(Draw_interline_spacing_eq), 1);
|
670
|
+
rb_define_method(Class_Draw, "interword_spacing=", RUBY_METHOD_FUNC(Draw_interword_spacing_eq), 1);
|
671
|
+
rb_define_method(Class_Draw, "kerning=", RUBY_METHOD_FUNC(Draw_kerning_eq), 1);
|
672
|
+
rb_define_method(Class_Draw, "pointsize=", RUBY_METHOD_FUNC(Draw_pointsize_eq), 1);
|
673
|
+
rb_define_method(Class_Draw, "rotation=", RUBY_METHOD_FUNC(Draw_rotation_eq), 1);
|
674
|
+
rb_define_method(Class_Draw, "stroke=", RUBY_METHOD_FUNC(Draw_stroke_eq), 1);
|
675
|
+
rb_define_method(Class_Draw, "stroke_pattern=", RUBY_METHOD_FUNC(Draw_stroke_pattern_eq), 1);
|
676
|
+
rb_define_method(Class_Draw, "stroke_width=", RUBY_METHOD_FUNC(Draw_stroke_width_eq), 1);
|
677
|
+
rb_define_method(Class_Draw, "text_antialias=", RUBY_METHOD_FUNC(Draw_text_antialias_eq), 1);
|
678
|
+
rb_define_method(Class_Draw, "tile=", RUBY_METHOD_FUNC(Draw_tile_eq), 1);
|
679
|
+
rb_define_method(Class_Draw, "undercolor=", RUBY_METHOD_FUNC(Draw_undercolor_eq), 1);
|
680
|
+
|
681
|
+
rb_define_method(Class_Draw, "annotate", RUBY_METHOD_FUNC(Draw_annotate), 6);
|
682
|
+
rb_define_method(Class_Draw, "clone", RUBY_METHOD_FUNC(Draw_clone), 0);
|
683
|
+
rb_define_method(Class_Draw, "composite", RUBY_METHOD_FUNC(Draw_composite), -1);
|
684
|
+
rb_define_method(Class_Draw, "draw", RUBY_METHOD_FUNC(Draw_draw), 1);
|
685
|
+
rb_define_method(Class_Draw, "dup", RUBY_METHOD_FUNC(Draw_dup), 0);
|
686
|
+
rb_define_method(Class_Draw, "get_type_metrics", RUBY_METHOD_FUNC(Draw_get_type_metrics), -1);
|
687
|
+
rb_define_method(Class_Draw, "get_multiline_type_metrics", RUBY_METHOD_FUNC(Draw_get_multiline_type_metrics), -1);
|
688
|
+
rb_define_method(Class_Draw, "initialize", RUBY_METHOD_FUNC(Draw_initialize), 0);
|
689
|
+
rb_define_method(Class_Draw, "initialize_copy", RUBY_METHOD_FUNC(Draw_init_copy), 1);
|
690
|
+
rb_define_method(Class_Draw, "inspect", RUBY_METHOD_FUNC(Draw_inspect), 0);
|
691
|
+
rb_define_method(Class_Draw, "marshal_dump", RUBY_METHOD_FUNC(Draw_marshal_dump), 0);
|
692
|
+
rb_define_method(Class_Draw, "marshal_load", RUBY_METHOD_FUNC(Draw_marshal_load), 1);
|
693
|
+
rb_define_method(Class_Draw, "primitive", RUBY_METHOD_FUNC(Draw_primitive), 1);
|
694
|
+
|
695
|
+
/*-----------------------------------------------------------------------*/
|
696
|
+
/* Class Magick::DrawOptions is identical to Magick::Draw but with */
|
697
|
+
/* only the attribute writer methods. This is the object that is passed */
|
698
|
+
/* to the block associated with the Draw.new method call. */
|
699
|
+
/*-----------------------------------------------------------------------*/
|
700
|
+
|
701
|
+
Class_DrawOptions = rb_define_class_under(Class_Image, "DrawOptions", rb_cObject);
|
702
|
+
|
703
|
+
rb_define_alloc_func(Class_DrawOptions, DrawOptions_alloc);
|
704
|
+
|
705
|
+
rb_define_method(Class_DrawOptions, "initialize", RUBY_METHOD_FUNC(DrawOptions_initialize), 0);
|
706
|
+
|
707
|
+
rb_define_method(Class_DrawOptions, "affine=", RUBY_METHOD_FUNC(Draw_affine_eq), 1);
|
708
|
+
rb_define_method(Class_DrawOptions, "align=", RUBY_METHOD_FUNC(Draw_align_eq), 1);
|
709
|
+
rb_define_method(Class_DrawOptions, "decorate=", RUBY_METHOD_FUNC(Draw_decorate_eq), 1);
|
710
|
+
rb_define_method(Class_DrawOptions, "density=", RUBY_METHOD_FUNC(Draw_density_eq), 1);
|
711
|
+
rb_define_method(Class_DrawOptions, "encoding=", RUBY_METHOD_FUNC(Draw_encoding_eq), 1);
|
712
|
+
rb_define_method(Class_DrawOptions, "fill=", RUBY_METHOD_FUNC(Draw_fill_eq), 1);
|
713
|
+
rb_define_method(Class_DrawOptions, "fill_pattern=", RUBY_METHOD_FUNC(Draw_fill_pattern_eq), 1);
|
714
|
+
rb_define_method(Class_DrawOptions, "font=", RUBY_METHOD_FUNC(Draw_font_eq), 1);
|
715
|
+
rb_define_method(Class_DrawOptions, "font_family=", RUBY_METHOD_FUNC(Draw_font_family_eq), 1);
|
716
|
+
rb_define_method(Class_DrawOptions, "font_stretch=", RUBY_METHOD_FUNC(Draw_font_stretch_eq), 1);
|
717
|
+
rb_define_method(Class_DrawOptions, "font_style=", RUBY_METHOD_FUNC(Draw_font_style_eq), 1);
|
718
|
+
rb_define_method(Class_DrawOptions, "font_weight=", RUBY_METHOD_FUNC(Draw_font_weight_eq), 1);
|
719
|
+
rb_define_method(Class_DrawOptions, "gravity=", RUBY_METHOD_FUNC(Draw_gravity_eq), 1);
|
720
|
+
rb_define_method(Class_DrawOptions, "pointsize=", RUBY_METHOD_FUNC(Draw_pointsize_eq), 1);
|
721
|
+
rb_define_method(Class_DrawOptions, "rotation=", RUBY_METHOD_FUNC(Draw_rotation_eq), 1);
|
722
|
+
rb_define_method(Class_DrawOptions, "stroke=", RUBY_METHOD_FUNC(Draw_stroke_eq), 1);
|
723
|
+
rb_define_method(Class_DrawOptions, "stroke_pattern=", RUBY_METHOD_FUNC(Draw_stroke_pattern_eq), 1);
|
724
|
+
rb_define_method(Class_DrawOptions, "stroke_width=", RUBY_METHOD_FUNC(Draw_stroke_width_eq), 1);
|
725
|
+
rb_define_method(Class_DrawOptions, "text_antialias=", RUBY_METHOD_FUNC(Draw_text_antialias_eq), 1);
|
726
|
+
rb_define_method(Class_DrawOptions, "tile=", RUBY_METHOD_FUNC(Draw_tile_eq), 1);
|
727
|
+
rb_define_method(Class_DrawOptions, "undercolor=", RUBY_METHOD_FUNC(Draw_undercolor_eq), 1);
|
728
|
+
|
729
|
+
/*-----------------------------------------------------------------------*/
|
730
|
+
/* Class Magick::Pixel */
|
731
|
+
/*-----------------------------------------------------------------------*/
|
732
|
+
|
733
|
+
Class_Pixel = rb_define_class_under(Module_Magick, "Pixel", rb_cObject);
|
734
|
+
|
735
|
+
// include Comparable
|
736
|
+
rb_include_module(Class_Pixel, rb_mComparable);
|
737
|
+
|
738
|
+
// Magick::Pixel has 3 constructors: "new" "from_color", "from_hsla"
|
739
|
+
rb_define_alloc_func(Class_Pixel, Pixel_alloc);
|
740
|
+
rb_define_singleton_method(Class_Pixel, "from_color", RUBY_METHOD_FUNC(Pixel_from_color), 1);
|
741
|
+
rb_define_singleton_method(Class_Pixel, "from_hsla", RUBY_METHOD_FUNC(Pixel_from_hsla), -1);
|
742
|
+
|
743
|
+
// Define the RGBA attributes
|
744
|
+
rb_define_method(Class_Pixel, "red", RUBY_METHOD_FUNC(Pixel_red), 0);
|
745
|
+
rb_define_method(Class_Pixel, "red=", RUBY_METHOD_FUNC(Pixel_red_eq), 1);
|
746
|
+
rb_define_method(Class_Pixel, "green", RUBY_METHOD_FUNC(Pixel_green), 0);
|
747
|
+
rb_define_method(Class_Pixel, "green=", RUBY_METHOD_FUNC(Pixel_green_eq), 1);
|
748
|
+
rb_define_method(Class_Pixel, "blue", RUBY_METHOD_FUNC(Pixel_blue), 0);
|
749
|
+
rb_define_method(Class_Pixel, "blue=", RUBY_METHOD_FUNC(Pixel_blue_eq), 1);
|
750
|
+
rb_define_method(Class_Pixel, "alpha", RUBY_METHOD_FUNC(Pixel_alpha), 0);
|
751
|
+
rb_define_method(Class_Pixel, "alpha=", RUBY_METHOD_FUNC(Pixel_alpha_eq), 1);
|
752
|
+
|
753
|
+
// Define the CMYK attributes
|
754
|
+
rb_define_method(Class_Pixel, "cyan", RUBY_METHOD_FUNC(Pixel_cyan), 0);
|
755
|
+
rb_define_method(Class_Pixel, "cyan=", RUBY_METHOD_FUNC(Pixel_cyan_eq), 1);
|
756
|
+
rb_define_method(Class_Pixel, "magenta", RUBY_METHOD_FUNC(Pixel_magenta), 0);
|
757
|
+
rb_define_method(Class_Pixel, "magenta=", RUBY_METHOD_FUNC(Pixel_magenta_eq), 1);
|
758
|
+
rb_define_method(Class_Pixel, "yellow", RUBY_METHOD_FUNC(Pixel_yellow), 0);
|
759
|
+
rb_define_method(Class_Pixel, "yellow=", RUBY_METHOD_FUNC(Pixel_yellow_eq), 1);
|
760
|
+
rb_define_method(Class_Pixel, "black", RUBY_METHOD_FUNC(Pixel_black), 0);
|
761
|
+
rb_define_method(Class_Pixel, "black=", RUBY_METHOD_FUNC(Pixel_black_eq), 1);
|
762
|
+
|
763
|
+
|
764
|
+
// Define the instance methods
|
765
|
+
rb_define_method(Class_Pixel, "<=>", RUBY_METHOD_FUNC(Pixel_spaceship), 1);
|
766
|
+
rb_define_method(Class_Pixel, "===", RUBY_METHOD_FUNC(Pixel_case_eq), 1);
|
767
|
+
rb_define_method(Class_Pixel, "eql?", RUBY_METHOD_FUNC(Pixel_eql_q), 1);
|
768
|
+
rb_define_method(Class_Pixel, "initialize", RUBY_METHOD_FUNC(Pixel_initialize), -1);
|
769
|
+
rb_define_method(Class_Pixel, "initialize_copy", RUBY_METHOD_FUNC(Pixel_init_copy), 1);
|
770
|
+
rb_define_method(Class_Pixel, "clone", RUBY_METHOD_FUNC(Pixel_clone), 0);
|
771
|
+
rb_define_method(Class_Pixel, "dup", RUBY_METHOD_FUNC(Pixel_dup), 0);
|
772
|
+
rb_define_method(Class_Pixel, "fcmp", RUBY_METHOD_FUNC(Pixel_fcmp), -1);
|
773
|
+
rb_define_method(Class_Pixel, "hash", RUBY_METHOD_FUNC(Pixel_hash), 0);
|
774
|
+
rb_define_method(Class_Pixel, "intensity", RUBY_METHOD_FUNC(Pixel_intensity), 0);
|
775
|
+
rb_define_method(Class_Pixel, "marshal_dump", RUBY_METHOD_FUNC(Pixel_marshal_dump), 0);
|
776
|
+
rb_define_method(Class_Pixel, "marshal_load", RUBY_METHOD_FUNC(Pixel_marshal_load), 1);
|
777
|
+
rb_define_method(Class_Pixel, "to_color", RUBY_METHOD_FUNC(Pixel_to_color), -1);
|
778
|
+
rb_define_method(Class_Pixel, "to_hsla", RUBY_METHOD_FUNC(Pixel_to_hsla), 0);
|
779
|
+
rb_define_method(Class_Pixel, "to_s", RUBY_METHOD_FUNC(Pixel_to_s), 0);
|
780
|
+
|
781
|
+
/*-----------------------------------------------------------------------*/
|
782
|
+
/* Class Magick::ImageList::Montage methods */
|
783
|
+
/*-----------------------------------------------------------------------*/
|
784
|
+
|
785
|
+
Class_Montage = rb_define_class_under(Class_ImageList, "Montage", rb_cObject);
|
786
|
+
|
787
|
+
rb_define_alloc_func(Class_Montage, Montage_alloc);
|
788
|
+
|
789
|
+
rb_define_method(Class_Montage, "initialize", RUBY_METHOD_FUNC(Montage_initialize), 0);
|
790
|
+
rb_define_method(Class_Montage, "freeze", RUBY_METHOD_FUNC(rm_no_freeze), 0);
|
791
|
+
|
792
|
+
// These accessors supply optional arguments for Magick::ImageList::Montage.new
|
793
|
+
rb_define_method(Class_Montage, "background_color=", RUBY_METHOD_FUNC(Montage_background_color_eq), 1);
|
794
|
+
rb_define_method(Class_Montage, "border_color=", RUBY_METHOD_FUNC(Montage_border_color_eq), 1);
|
795
|
+
rb_define_method(Class_Montage, "border_width=", RUBY_METHOD_FUNC(Montage_border_width_eq), 1);
|
796
|
+
rb_define_method(Class_Montage, "compose=", RUBY_METHOD_FUNC(Montage_compose_eq), 1);
|
797
|
+
rb_define_method(Class_Montage, "filename=", RUBY_METHOD_FUNC(Montage_filename_eq), 1);
|
798
|
+
rb_define_method(Class_Montage, "fill=", RUBY_METHOD_FUNC(Montage_fill_eq), 1);
|
799
|
+
rb_define_method(Class_Montage, "font=", RUBY_METHOD_FUNC(Montage_font_eq), 1);
|
800
|
+
rb_define_method(Class_Montage, "frame=", RUBY_METHOD_FUNC(Montage_frame_eq), 1);
|
801
|
+
rb_define_method(Class_Montage, "geometry=", RUBY_METHOD_FUNC(Montage_geometry_eq), 1);
|
802
|
+
rb_define_method(Class_Montage, "gravity=", RUBY_METHOD_FUNC(Montage_gravity_eq), 1);
|
803
|
+
rb_define_method(Class_Montage, "matte_color=", RUBY_METHOD_FUNC(Montage_matte_color_eq), 1);
|
804
|
+
rb_define_method(Class_Montage, "pointsize=", RUBY_METHOD_FUNC(Montage_pointsize_eq), 1);
|
805
|
+
rb_define_method(Class_Montage, "shadow=", RUBY_METHOD_FUNC(Montage_shadow_eq), 1);
|
806
|
+
rb_define_method(Class_Montage, "stroke=", RUBY_METHOD_FUNC(Montage_stroke_eq), 1);
|
807
|
+
rb_define_method(Class_Montage, "texture=", RUBY_METHOD_FUNC(Montage_texture_eq), 1);
|
808
|
+
rb_define_method(Class_Montage, "tile=", RUBY_METHOD_FUNC(Montage_tile_eq), 1);
|
809
|
+
rb_define_method(Class_Montage, "title=", RUBY_METHOD_FUNC(Montage_title_eq), 1);
|
810
|
+
|
811
|
+
/*-----------------------------------------------------------------------*/
|
812
|
+
/* Class Magick::Image::Info */
|
813
|
+
/*-----------------------------------------------------------------------*/
|
814
|
+
|
815
|
+
Class_Info = rb_define_class_under(Class_Image, "Info", rb_cObject);
|
816
|
+
|
817
|
+
rb_define_alloc_func(Class_Info, Info_alloc);
|
818
|
+
|
819
|
+
rb_define_method(Class_Info, "initialize", RUBY_METHOD_FUNC(Info_initialize), 0);
|
820
|
+
rb_define_method(Class_Info, "channel", RUBY_METHOD_FUNC(Info_channel), -1);
|
821
|
+
rb_define_method(Class_Info, "freeze", RUBY_METHOD_FUNC(rm_no_freeze), 0);
|
822
|
+
rb_define_method(Class_Info, "define", RUBY_METHOD_FUNC(Info_define), -1);
|
823
|
+
rb_define_method(Class_Info, "[]=", RUBY_METHOD_FUNC(Info_aset), -1);
|
824
|
+
rb_define_method(Class_Info, "[]", RUBY_METHOD_FUNC(Info_aref), -1);
|
825
|
+
rb_define_method(Class_Info, "undefine", RUBY_METHOD_FUNC(Info_undefine), 2);
|
826
|
+
|
827
|
+
// Define the attributes
|
828
|
+
rb_define_method(Class_Info, "antialias", RUBY_METHOD_FUNC(Info_antialias), 0);
|
829
|
+
rb_define_method(Class_Info, "antialias=", RUBY_METHOD_FUNC(Info_antialias_eq), 1);
|
830
|
+
rb_define_method(Class_Info, "attenuate", RUBY_METHOD_FUNC(Info_attenuate), 0);
|
831
|
+
rb_define_method(Class_Info, "attenuate=", RUBY_METHOD_FUNC(Info_attenuate_eq), 1);
|
832
|
+
rb_define_method(Class_Info, "authenticate", RUBY_METHOD_FUNC(Info_authenticate), 0);
|
833
|
+
rb_define_method(Class_Info, "authenticate=", RUBY_METHOD_FUNC(Info_authenticate_eq), 1);
|
834
|
+
rb_define_method(Class_Info, "background_color", RUBY_METHOD_FUNC(Info_background_color), 0);
|
835
|
+
rb_define_method(Class_Info, "background_color=", RUBY_METHOD_FUNC(Info_background_color_eq), 1);
|
836
|
+
rb_define_method(Class_Info, "border_color", RUBY_METHOD_FUNC(Info_border_color), 0);
|
837
|
+
rb_define_method(Class_Info, "border_color=", RUBY_METHOD_FUNC(Info_border_color_eq), 1);
|
838
|
+
rb_define_method(Class_Info, "caption", RUBY_METHOD_FUNC(Info_caption), 0);
|
839
|
+
rb_define_method(Class_Info, "caption=", RUBY_METHOD_FUNC(Info_caption_eq), 1);
|
840
|
+
rb_define_method(Class_Info, "colorspace", RUBY_METHOD_FUNC(Info_colorspace), 0);
|
841
|
+
rb_define_method(Class_Info, "colorspace=", RUBY_METHOD_FUNC(Info_colorspace_eq), 1);
|
842
|
+
rb_define_method(Class_Info, "comment", RUBY_METHOD_FUNC(Info_comment), 0);
|
843
|
+
rb_define_method(Class_Info, "comment=", RUBY_METHOD_FUNC(Info_comment_eq), 1);
|
844
|
+
rb_define_method(Class_Info, "compression", RUBY_METHOD_FUNC(Info_compression), 0);
|
845
|
+
rb_define_method(Class_Info, "compression=", RUBY_METHOD_FUNC(Info_compression_eq), 1);
|
846
|
+
rb_define_method(Class_Info, "delay", RUBY_METHOD_FUNC(Info_delay), 0);
|
847
|
+
rb_define_method(Class_Info, "delay=", RUBY_METHOD_FUNC(Info_delay_eq), 1);
|
848
|
+
rb_define_method(Class_Info, "density", RUBY_METHOD_FUNC(Info_density), 0);
|
849
|
+
rb_define_method(Class_Info, "density=", RUBY_METHOD_FUNC(Info_density_eq), 1);
|
850
|
+
rb_define_method(Class_Info, "depth", RUBY_METHOD_FUNC(Info_depth), 0);
|
851
|
+
rb_define_method(Class_Info, "depth=", RUBY_METHOD_FUNC(Info_depth_eq), 1);
|
852
|
+
rb_define_method(Class_Info, "dispose", RUBY_METHOD_FUNC(Info_dispose), 0);
|
853
|
+
rb_define_method(Class_Info, "dispose=", RUBY_METHOD_FUNC(Info_dispose_eq), 1);
|
854
|
+
rb_define_method(Class_Info, "dither", RUBY_METHOD_FUNC(Info_dither), 0);
|
855
|
+
rb_define_method(Class_Info, "dither=", RUBY_METHOD_FUNC(Info_dither_eq), 1);
|
856
|
+
rb_define_method(Class_Info, "endian", RUBY_METHOD_FUNC(Info_endian), 0);
|
857
|
+
rb_define_method(Class_Info, "endian=", RUBY_METHOD_FUNC(Info_endian_eq), 1);
|
858
|
+
rb_define_method(Class_Info, "extract", RUBY_METHOD_FUNC(Info_extract), 0);
|
859
|
+
rb_define_method(Class_Info, "extract=", RUBY_METHOD_FUNC(Info_extract_eq), 1);
|
860
|
+
rb_define_method(Class_Info, "filename", RUBY_METHOD_FUNC(Info_filename), 0);
|
861
|
+
rb_define_method(Class_Info, "filename=", RUBY_METHOD_FUNC(Info_filename_eq), 1);
|
862
|
+
rb_define_method(Class_Info, "fill", RUBY_METHOD_FUNC(Info_fill), 0);
|
863
|
+
rb_define_method(Class_Info, "fill=", RUBY_METHOD_FUNC(Info_fill_eq), 1);
|
864
|
+
rb_define_method(Class_Info, "font", RUBY_METHOD_FUNC(Info_font), 0);
|
865
|
+
rb_define_method(Class_Info, "font=", RUBY_METHOD_FUNC(Info_font_eq), 1);
|
866
|
+
rb_define_method(Class_Info, "format", RUBY_METHOD_FUNC(Info_format), 0);
|
867
|
+
rb_define_method(Class_Info, "format=", RUBY_METHOD_FUNC(Info_format_eq), 1);
|
868
|
+
rb_define_method(Class_Info, "fuzz", RUBY_METHOD_FUNC(Info_fuzz), 0);
|
869
|
+
rb_define_method(Class_Info, "fuzz=", RUBY_METHOD_FUNC(Info_fuzz_eq), 1);
|
870
|
+
rb_define_method(Class_Info, "gravity", RUBY_METHOD_FUNC(Info_gravity), 0);
|
871
|
+
rb_define_method(Class_Info, "gravity=", RUBY_METHOD_FUNC(Info_gravity_eq), 1);
|
872
|
+
rb_define_method(Class_Info, "image_type", RUBY_METHOD_FUNC(Info_image_type), 0);
|
873
|
+
rb_define_method(Class_Info, "image_type=", RUBY_METHOD_FUNC(Info_image_type_eq), 1);
|
874
|
+
rb_define_method(Class_Info, "interlace", RUBY_METHOD_FUNC(Info_interlace), 0);
|
875
|
+
rb_define_method(Class_Info, "interlace=", RUBY_METHOD_FUNC(Info_interlace_eq), 1);
|
876
|
+
rb_define_method(Class_Info, "label", RUBY_METHOD_FUNC(Info_label), 0);
|
877
|
+
rb_define_method(Class_Info, "label=", RUBY_METHOD_FUNC(Info_label_eq), 1);
|
878
|
+
rb_define_method(Class_Info, "matte_color", RUBY_METHOD_FUNC(Info_matte_color), 0);
|
879
|
+
rb_define_method(Class_Info, "matte_color=", RUBY_METHOD_FUNC(Info_matte_color_eq), 1);
|
880
|
+
rb_define_method(Class_Info, "monochrome", RUBY_METHOD_FUNC(Info_monochrome), 0);
|
881
|
+
rb_define_method(Class_Info, "monochrome=", RUBY_METHOD_FUNC(Info_monochrome_eq), 1);
|
882
|
+
rb_define_method(Class_Info, "number_scenes", RUBY_METHOD_FUNC(Info_number_scenes), 0);
|
883
|
+
rb_define_method(Class_Info, "number_scenes=", RUBY_METHOD_FUNC(Info_number_scenes_eq), 1);
|
884
|
+
rb_define_method(Class_Info, "orientation", RUBY_METHOD_FUNC(Info_orientation), 0);
|
885
|
+
rb_define_method(Class_Info, "orientation=", RUBY_METHOD_FUNC(Info_orientation_eq), 1);
|
886
|
+
rb_define_method(Class_Info, "origin", RUBY_METHOD_FUNC(Info_origin), 0); // new in 6.3.1
|
887
|
+
rb_define_method(Class_Info, "origin=", RUBY_METHOD_FUNC(Info_origin_eq), 1); // new in 6.3.1
|
888
|
+
rb_define_method(Class_Info, "page", RUBY_METHOD_FUNC(Info_page), 0);
|
889
|
+
rb_define_method(Class_Info, "page=", RUBY_METHOD_FUNC(Info_page_eq), 1);
|
890
|
+
rb_define_method(Class_Info, "pointsize", RUBY_METHOD_FUNC(Info_pointsize), 0);
|
891
|
+
rb_define_method(Class_Info, "pointsize=", RUBY_METHOD_FUNC(Info_pointsize_eq), 1);
|
892
|
+
rb_define_method(Class_Info, "quality", RUBY_METHOD_FUNC(Info_quality), 0);
|
893
|
+
rb_define_method(Class_Info, "quality=", RUBY_METHOD_FUNC(Info_quality_eq), 1);
|
894
|
+
rb_define_method(Class_Info, "sampling_factor", RUBY_METHOD_FUNC(Info_sampling_factor), 0);
|
895
|
+
rb_define_method(Class_Info, "sampling_factor=", RUBY_METHOD_FUNC(Info_sampling_factor_eq), 1);
|
896
|
+
rb_define_method(Class_Info, "scene", RUBY_METHOD_FUNC(Info_scene), 0);
|
897
|
+
rb_define_method(Class_Info, "scene=", RUBY_METHOD_FUNC(Info_scene_eq), 1);
|
898
|
+
rb_define_method(Class_Info, "server_name", RUBY_METHOD_FUNC(Info_server_name), 0);
|
899
|
+
rb_define_method(Class_Info, "server_name=", RUBY_METHOD_FUNC(Info_server_name_eq), 1);
|
900
|
+
rb_define_method(Class_Info, "size", RUBY_METHOD_FUNC(Info_size), 0);
|
901
|
+
rb_define_method(Class_Info, "size=", RUBY_METHOD_FUNC(Info_size_eq), 1);
|
902
|
+
rb_define_method(Class_Info, "stroke", RUBY_METHOD_FUNC(Info_stroke), 0);
|
903
|
+
rb_define_method(Class_Info, "stroke=", RUBY_METHOD_FUNC(Info_stroke_eq), 1);
|
904
|
+
rb_define_method(Class_Info, "stroke_width", RUBY_METHOD_FUNC(Info_stroke_width), 0);
|
905
|
+
rb_define_method(Class_Info, "stroke_width=", RUBY_METHOD_FUNC(Info_stroke_width_eq), 1);
|
906
|
+
rb_define_method(Class_Info, "texture=", RUBY_METHOD_FUNC(Info_texture_eq), 1);
|
907
|
+
rb_define_method(Class_Info, "tile_offset", RUBY_METHOD_FUNC(Info_tile_offset), 0);
|
908
|
+
rb_define_method(Class_Info, "tile_offset=", RUBY_METHOD_FUNC(Info_tile_offset_eq), 1);
|
909
|
+
rb_define_method(Class_Info, "transparent_color", RUBY_METHOD_FUNC(Info_transparent_color), 0);
|
910
|
+
rb_define_method(Class_Info, "transparent_color=", RUBY_METHOD_FUNC(Info_transparent_color_eq), 1);
|
911
|
+
rb_define_method(Class_Info, "undercolor", RUBY_METHOD_FUNC(Info_undercolor), 0);
|
912
|
+
rb_define_method(Class_Info, "undercolor=", RUBY_METHOD_FUNC(Info_undercolor_eq), 1);
|
913
|
+
rb_define_method(Class_Info, "units", RUBY_METHOD_FUNC(Info_units), 0);
|
914
|
+
rb_define_method(Class_Info, "units=", RUBY_METHOD_FUNC(Info_units_eq), 1);
|
915
|
+
rb_define_method(Class_Info, "view", RUBY_METHOD_FUNC(Info_view), 0);
|
916
|
+
rb_define_method(Class_Info, "view=", RUBY_METHOD_FUNC(Info_view_eq), 1);
|
917
|
+
|
918
|
+
/*-----------------------------------------------------------------------*/
|
919
|
+
/* Class Magick::KernelInfo */
|
920
|
+
/*-----------------------------------------------------------------------*/
|
921
|
+
|
922
|
+
Class_KernelInfo = rb_define_class_under(Module_Magick, "KernelInfo", rb_cObject);
|
923
|
+
|
924
|
+
rb_define_alloc_func(Class_KernelInfo, KernelInfo_alloc);
|
925
|
+
|
926
|
+
rb_define_method(Class_KernelInfo, "initialize", RUBY_METHOD_FUNC(KernelInfo_initialize), 1);
|
927
|
+
rb_define_method(Class_KernelInfo, "unity_add", RUBY_METHOD_FUNC(KernelInfo_unity_add), 1);
|
928
|
+
rb_define_method(Class_KernelInfo, "scale", RUBY_METHOD_FUNC(KernelInfo_scale), 2);
|
929
|
+
rb_define_method(Class_KernelInfo, "scale_geometry", RUBY_METHOD_FUNC(KernelInfo_scale_geometry), 1);
|
930
|
+
rb_define_method(Class_KernelInfo, "clone", RUBY_METHOD_FUNC(KernelInfo_clone), 0);
|
931
|
+
rb_define_method(Class_KernelInfo, "dup", RUBY_METHOD_FUNC(KernelInfo_clone), 0);
|
932
|
+
|
933
|
+
rb_define_singleton_method(Class_KernelInfo, "builtin", RUBY_METHOD_FUNC(KernelInfo_builtin), 2);
|
934
|
+
|
935
|
+
|
936
|
+
/*-----------------------------------------------------------------------*/
|
937
|
+
/* Class Magick::Image::PolaroidOptions */
|
938
|
+
/*-----------------------------------------------------------------------*/
|
939
|
+
|
940
|
+
Class_PolaroidOptions = rb_define_class_under(Class_Image, "PolaroidOptions", rb_cObject);
|
941
|
+
|
942
|
+
rb_define_alloc_func(Class_PolaroidOptions, PolaroidOptions_alloc);
|
943
|
+
|
944
|
+
rb_define_method(Class_PolaroidOptions, "initialize", RUBY_METHOD_FUNC(PolaroidOptions_initialize), 0);
|
945
|
+
|
946
|
+
// Define the attributes
|
947
|
+
rb_define_method(Class_PolaroidOptions, "shadow_color=", RUBY_METHOD_FUNC(PolaroidOptions_shadow_color_eq), 1);
|
948
|
+
rb_define_method(Class_PolaroidOptions, "border_color=", RUBY_METHOD_FUNC(PolaroidOptions_border_color_eq), 1);
|
949
|
+
|
950
|
+
// The other attribute writer methods are implemented by Draw's functions
|
951
|
+
rb_define_method(Class_PolaroidOptions, "align=", RUBY_METHOD_FUNC(Draw_align_eq), 1);
|
952
|
+
rb_define_method(Class_PolaroidOptions, "decorate=", RUBY_METHOD_FUNC(Draw_decorate_eq), 1);
|
953
|
+
rb_define_method(Class_PolaroidOptions, "density=", RUBY_METHOD_FUNC(Draw_density_eq), 1);
|
954
|
+
rb_define_method(Class_PolaroidOptions, "encoding=", RUBY_METHOD_FUNC(Draw_encoding_eq), 1);
|
955
|
+
rb_define_method(Class_PolaroidOptions, "fill=", RUBY_METHOD_FUNC(Draw_fill_eq), 1);
|
956
|
+
rb_define_method(Class_PolaroidOptions, "fill_pattern=", RUBY_METHOD_FUNC(Draw_fill_pattern_eq), 1);
|
957
|
+
rb_define_method(Class_PolaroidOptions, "font=", RUBY_METHOD_FUNC(Draw_font_eq), 1);
|
958
|
+
rb_define_method(Class_PolaroidOptions, "font_family=", RUBY_METHOD_FUNC(Draw_font_family_eq), 1);
|
959
|
+
rb_define_method(Class_PolaroidOptions, "font_stretch=", RUBY_METHOD_FUNC(Draw_font_stretch_eq), 1);
|
960
|
+
rb_define_method(Class_PolaroidOptions, "font_style=", RUBY_METHOD_FUNC(Draw_font_style_eq), 1);
|
961
|
+
rb_define_method(Class_PolaroidOptions, "font_weight=", RUBY_METHOD_FUNC(Draw_font_weight_eq), 1);
|
962
|
+
rb_define_method(Class_PolaroidOptions, "gravity=", RUBY_METHOD_FUNC(Draw_gravity_eq), 1);
|
963
|
+
rb_define_method(Class_PolaroidOptions, "pointsize=", RUBY_METHOD_FUNC(Draw_pointsize_eq), 1);
|
964
|
+
rb_define_method(Class_PolaroidOptions, "stroke=", RUBY_METHOD_FUNC(Draw_stroke_eq), 1);
|
965
|
+
rb_define_method(Class_PolaroidOptions, "stroke_pattern=", RUBY_METHOD_FUNC(Draw_stroke_pattern_eq), 1);
|
966
|
+
rb_define_method(Class_PolaroidOptions, "stroke_width=", RUBY_METHOD_FUNC(Draw_stroke_width_eq), 1);
|
967
|
+
rb_define_method(Class_PolaroidOptions, "text_antialias=", RUBY_METHOD_FUNC(Draw_text_antialias_eq), 1);
|
968
|
+
rb_define_method(Class_PolaroidOptions, "undercolor=", RUBY_METHOD_FUNC(Draw_undercolor_eq), 1);
|
969
|
+
|
970
|
+
|
971
|
+
/*-----------------------------------------------------------------------*/
|
972
|
+
/* Magick::******Fill classes and methods */
|
973
|
+
/*-----------------------------------------------------------------------*/
|
974
|
+
|
975
|
+
// class Magick::GradientFill
|
976
|
+
Class_GradientFill = rb_define_class_under(Module_Magick, "GradientFill", rb_cObject);
|
977
|
+
|
978
|
+
rb_define_alloc_func(Class_GradientFill, GradientFill_alloc);
|
979
|
+
|
980
|
+
rb_define_method(Class_GradientFill, "initialize", RUBY_METHOD_FUNC(GradientFill_initialize), 6);
|
981
|
+
rb_define_method(Class_GradientFill, "fill", RUBY_METHOD_FUNC(GradientFill_fill), 1);
|
982
|
+
|
983
|
+
// class Magick::TextureFill
|
984
|
+
Class_TextureFill = rb_define_class_under(Module_Magick, "TextureFill", rb_cObject);
|
985
|
+
|
986
|
+
rb_define_alloc_func(Class_TextureFill, TextureFill_alloc);
|
987
|
+
|
988
|
+
rb_define_method(Class_TextureFill, "initialize", RUBY_METHOD_FUNC(TextureFill_initialize), 1);
|
989
|
+
rb_define_method(Class_TextureFill, "fill", RUBY_METHOD_FUNC(TextureFill_fill), 1);
|
990
|
+
|
991
|
+
/*-----------------------------------------------------------------------*/
|
992
|
+
/* Class Magick::ImageMagickError < StandardError */
|
993
|
+
/* Class Magick::FatalImageMagickError < StandardError */
|
994
|
+
/*-----------------------------------------------------------------------*/
|
995
|
+
|
996
|
+
Class_ImageMagickError = rb_define_class_under(Module_Magick, "ImageMagickError", rb_eStandardError);
|
997
|
+
rb_define_method(Class_ImageMagickError, "initialize", RUBY_METHOD_FUNC(ImageMagickError_initialize), -1);
|
998
|
+
rb_define_attr(Class_ImageMagickError, MAGICK_LOC, True, False);
|
999
|
+
|
1000
|
+
Class_FatalImageMagickError = rb_define_class_under(Module_Magick, "FatalImageMagickError", rb_eStandardError);
|
1001
|
+
|
1002
|
+
|
1003
|
+
/*-----------------------------------------------------------------------*/
|
1004
|
+
/* Class Magick::DestroyedImageError < StandardError */
|
1005
|
+
/*-----------------------------------------------------------------------*/
|
1006
|
+
Class_DestroyedImageError = rb_define_class_under(Module_Magick, "DestroyedImageError", rb_eStandardError);
|
1007
|
+
|
1008
|
+
|
1009
|
+
// Miscellaneous fixed-point constants
|
1010
|
+
DEF_CONST(QuantumRange);
|
1011
|
+
DEF_CONST(MAGICKCORE_QUANTUM_DEPTH);
|
1012
|
+
DEF_CONSTV(OpaqueAlpha, QuantumRange);
|
1013
|
+
DEF_CONSTV(TransparentAlpha, 0);
|
1014
|
+
|
1015
|
+
version_constants();
|
1016
|
+
features_constant();
|
1017
|
+
|
1018
|
+
/*-----------------------------------------------------------------------*/
|
1019
|
+
/* Class Magick::Enum */
|
1020
|
+
/*-----------------------------------------------------------------------*/
|
1021
|
+
|
1022
|
+
// includes Comparable
|
1023
|
+
Class_Enum = rb_define_class_under(Module_Magick, "Enum", rb_cObject);
|
1024
|
+
rb_include_module(Class_Enum, rb_mComparable);
|
1025
|
+
|
1026
|
+
rb_define_alloc_func(Class_Enum, Enum_alloc);
|
1027
|
+
|
1028
|
+
rb_define_method(Class_Enum, "initialize", RUBY_METHOD_FUNC(Enum_initialize), 2);
|
1029
|
+
rb_define_method(Class_Enum, "to_s", RUBY_METHOD_FUNC(Enum_to_s), 0);
|
1030
|
+
rb_define_method(Class_Enum, "to_i", RUBY_METHOD_FUNC(Enum_to_i), 0);
|
1031
|
+
rb_define_method(Class_Enum, "<=>", RUBY_METHOD_FUNC(Enum_spaceship), 1);
|
1032
|
+
rb_define_method(Class_Enum, "===", RUBY_METHOD_FUNC(Enum_case_eq), 1);
|
1033
|
+
rb_define_method(Class_Enum, "|", RUBY_METHOD_FUNC(Enum_bitwise_or), 1);
|
1034
|
+
|
1035
|
+
// AlignType constants
|
1036
|
+
DEF_ENUM(AlignType)
|
1037
|
+
ENUMERATOR(UndefinedAlign)
|
1038
|
+
ENUMERATOR(LeftAlign)
|
1039
|
+
ENUMERATOR(CenterAlign)
|
1040
|
+
ENUMERATOR(RightAlign)
|
1041
|
+
END_ENUM
|
1042
|
+
|
1043
|
+
// AlphaChannelOption constants
|
1044
|
+
DEF_ENUM(AlphaChannelOption)
|
1045
|
+
ENUMERATOR(UndefinedAlphaChannel)
|
1046
|
+
ENUMERATOR(ActivateAlphaChannel)
|
1047
|
+
ENUMERATOR(DeactivateAlphaChannel)
|
1048
|
+
ENUMERATOR(SetAlphaChannel)
|
1049
|
+
ENUMERATOR(RemoveAlphaChannel)
|
1050
|
+
ENUMERATOR(CopyAlphaChannel)
|
1051
|
+
ENUMERATOR(ExtractAlphaChannel)
|
1052
|
+
ENUMERATOR(OpaqueAlphaChannel)
|
1053
|
+
ENUMERATOR(ShapeAlphaChannel)
|
1054
|
+
ENUMERATOR(TransparentAlphaChannel)
|
1055
|
+
ENUMERATOR(BackgroundAlphaChannel)
|
1056
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1057
|
+
ENUMERATOR(AssociateAlphaChannel)
|
1058
|
+
ENUMERATOR(DisassociateAlphaChannel)
|
1059
|
+
#endif
|
1060
|
+
#if defined(IMAGEMAGICK_7)
|
1061
|
+
ENUMERATOR(OnAlphaChannel)
|
1062
|
+
ENUMERATOR(OffAlphaChannel)
|
1063
|
+
#else
|
1064
|
+
ENUMERATORV(OnAlphaChannel, ActivateAlphaChannel)
|
1065
|
+
ENUMERATORV(OffAlphaChannel, DeactivateAlphaChannel)
|
1066
|
+
#endif
|
1067
|
+
END_ENUM
|
1068
|
+
|
1069
|
+
// AnchorType constants (for Draw#text_anchor - these are not defined by ImageMagick)
|
1070
|
+
DEF_ENUM(AnchorType)
|
1071
|
+
ENUMERATOR(StartAnchor)
|
1072
|
+
ENUMERATOR(MiddleAnchor)
|
1073
|
+
ENUMERATOR(EndAnchor)
|
1074
|
+
END_ENUM
|
1075
|
+
|
1076
|
+
// ChannelType constants
|
1077
|
+
DEF_ENUM(ChannelType)
|
1078
|
+
ENUMERATOR(UndefinedChannel)
|
1079
|
+
ENUMERATOR(RedChannel)
|
1080
|
+
ENUMERATOR(CyanChannel)
|
1081
|
+
ENUMERATOR(GreenChannel)
|
1082
|
+
ENUMERATOR(MagentaChannel)
|
1083
|
+
ENUMERATOR(BlueChannel)
|
1084
|
+
ENUMERATOR(YellowChannel)
|
1085
|
+
ENUMERATOR(OpacityChannel)
|
1086
|
+
ENUMERATOR(BlackChannel)
|
1087
|
+
ENUMERATOR(IndexChannel)
|
1088
|
+
ENUMERATOR(GrayChannel)
|
1089
|
+
ENUMERATOR(AllChannels)
|
1090
|
+
ENUMERATORV(AlphaChannel, OpacityChannel)
|
1091
|
+
ENUMERATORV(DefaultChannels, 0xff & ~OpacityChannel)
|
1092
|
+
ENUMERATORV(HueChannel, RedChannel)
|
1093
|
+
ENUMERATORV(LuminosityChannel, BlueChannel)
|
1094
|
+
ENUMERATORV(SaturationChannel, GreenChannel)
|
1095
|
+
END_ENUM
|
1096
|
+
|
1097
|
+
// ClassType constants
|
1098
|
+
DEF_ENUM(ClassType)
|
1099
|
+
ENUMERATOR(UndefinedClass)
|
1100
|
+
ENUMERATOR(PseudoClass)
|
1101
|
+
ENUMERATOR(DirectClass)
|
1102
|
+
END_ENUM
|
1103
|
+
|
1104
|
+
// ColorspaceType constants
|
1105
|
+
DEF_ENUM(ColorspaceType)
|
1106
|
+
ENUMERATOR(UndefinedColorspace)
|
1107
|
+
ENUMERATOR(RGBColorspace)
|
1108
|
+
ENUMERATOR(GRAYColorspace)
|
1109
|
+
ENUMERATOR(TransparentColorspace)
|
1110
|
+
ENUMERATOR(OHTAColorspace)
|
1111
|
+
ENUMERATOR(XYZColorspace)
|
1112
|
+
ENUMERATOR(YCbCrColorspace)
|
1113
|
+
ENUMERATOR(YCCColorspace)
|
1114
|
+
ENUMERATOR(YIQColorspace)
|
1115
|
+
ENUMERATOR(YPbPrColorspace)
|
1116
|
+
ENUMERATOR(YUVColorspace)
|
1117
|
+
ENUMERATOR(CMYKColorspace)
|
1118
|
+
ENUMERATORV(SRGBColorspace, sRGBColorspace)
|
1119
|
+
ENUMERATOR(HSLColorspace)
|
1120
|
+
ENUMERATOR(HWBColorspace)
|
1121
|
+
ENUMERATOR(HSBColorspace)
|
1122
|
+
ENUMERATOR(LabColorspace)
|
1123
|
+
ENUMERATOR(Rec601YCbCrColorspace)
|
1124
|
+
ENUMERATOR(Rec709YCbCrColorspace)
|
1125
|
+
ENUMERATOR(LogColorspace)
|
1126
|
+
ENUMERATOR(CMYColorspace)
|
1127
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1128
|
+
ENUMERATOR(LuvColorspace)
|
1129
|
+
ENUMERATOR(HCLColorspace)
|
1130
|
+
ENUMERATOR(LCHColorspace)
|
1131
|
+
ENUMERATOR(LMSColorspace)
|
1132
|
+
ENUMERATOR(LCHabColorspace)
|
1133
|
+
ENUMERATOR(LCHuvColorspace)
|
1134
|
+
ENUMERATORV(ScRGBColorspace, scRGBColorspace)
|
1135
|
+
ENUMERATOR(HSIColorspace)
|
1136
|
+
ENUMERATOR(HSVColorspace)
|
1137
|
+
ENUMERATOR(HCLpColorspace)
|
1138
|
+
ENUMERATOR(YDbDrColorspace)
|
1139
|
+
ENUMERATORV(XyYColorspace, xyYColorspace)
|
1140
|
+
#endif
|
1141
|
+
#if defined(IMAGEMAGICK_7)
|
1142
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_7_0_8)
|
1143
|
+
ENUMERATOR(LinearGRAYColorspace)
|
1144
|
+
#endif
|
1145
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_7_0_10)
|
1146
|
+
ENUMERATOR(JzazbzColorspace)
|
1147
|
+
#endif
|
1148
|
+
#elif defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_9_10)
|
1149
|
+
ENUMERATOR(LinearGRAYColorspace)
|
1150
|
+
#endif
|
1151
|
+
END_ENUM
|
1152
|
+
|
1153
|
+
// ComplianceType constants are defined as enums but used as bit flags
|
1154
|
+
DEF_ENUM(ComplianceType)
|
1155
|
+
ENUMERATOR(UndefinedCompliance)
|
1156
|
+
// AllCompliance is 0xffff, not too useful for us!
|
1157
|
+
ENUMERATORV(AllCompliance, SVGCompliance|X11Compliance|XPMCompliance)
|
1158
|
+
ENUMERATOR(NoCompliance)
|
1159
|
+
ENUMERATOR(SVGCompliance)
|
1160
|
+
ENUMERATOR(X11Compliance)
|
1161
|
+
ENUMERATOR(XPMCompliance)
|
1162
|
+
END_ENUM
|
1163
|
+
|
1164
|
+
// CompositeOperator constants
|
1165
|
+
DEF_ENUM(CompositeOperator)
|
1166
|
+
ENUMERATOR(AtopCompositeOp)
|
1167
|
+
ENUMERATOR(BlendCompositeOp)
|
1168
|
+
ENUMERATOR(BlurCompositeOp)
|
1169
|
+
ENUMERATOR(BumpmapCompositeOp)
|
1170
|
+
ENUMERATOR(ChangeMaskCompositeOp)
|
1171
|
+
ENUMERATOR(ClearCompositeOp)
|
1172
|
+
ENUMERATOR(ColorBurnCompositeOp)
|
1173
|
+
ENUMERATOR(ColorDodgeCompositeOp)
|
1174
|
+
ENUMERATOR(ColorizeCompositeOp)
|
1175
|
+
ENUMERATOR(CopyBlackCompositeOp)
|
1176
|
+
ENUMERATOR(CopyBlueCompositeOp)
|
1177
|
+
ENUMERATOR(CopyCompositeOp)
|
1178
|
+
ENUMERATOR(CopyCyanCompositeOp)
|
1179
|
+
ENUMERATOR(CopyGreenCompositeOp)
|
1180
|
+
ENUMERATOR(CopyMagentaCompositeOp)
|
1181
|
+
ENUMERATOR(CopyRedCompositeOp)
|
1182
|
+
ENUMERATOR(CopyYellowCompositeOp)
|
1183
|
+
ENUMERATOR(DarkenCompositeOp)
|
1184
|
+
ENUMERATOR(DarkenIntensityCompositeOp)
|
1185
|
+
ENUMERATOR(DistortCompositeOp)
|
1186
|
+
ENUMERATOR(DivideDstCompositeOp)
|
1187
|
+
ENUMERATOR(DivideSrcCompositeOp)
|
1188
|
+
ENUMERATOR(DstAtopCompositeOp)
|
1189
|
+
ENUMERATOR(DstCompositeOp)
|
1190
|
+
ENUMERATOR(DstInCompositeOp)
|
1191
|
+
ENUMERATOR(DstOutCompositeOp)
|
1192
|
+
ENUMERATOR(DstOverCompositeOp)
|
1193
|
+
ENUMERATOR(DifferenceCompositeOp)
|
1194
|
+
ENUMERATOR(DisplaceCompositeOp)
|
1195
|
+
ENUMERATOR(DissolveCompositeOp)
|
1196
|
+
ENUMERATOR(ExclusionCompositeOp)
|
1197
|
+
ENUMERATOR(HardLightCompositeOp)
|
1198
|
+
ENUMERATOR(HueCompositeOp)
|
1199
|
+
ENUMERATOR(InCompositeOp)
|
1200
|
+
ENUMERATOR(LightenCompositeOp)
|
1201
|
+
ENUMERATOR(LightenIntensityCompositeOp)
|
1202
|
+
ENUMERATOR(LinearBurnCompositeOp)
|
1203
|
+
ENUMERATOR(LinearDodgeCompositeOp)
|
1204
|
+
ENUMERATOR(LinearLightCompositeOp)
|
1205
|
+
ENUMERATOR(LuminizeCompositeOp)
|
1206
|
+
ENUMERATOR(MathematicsCompositeOp)
|
1207
|
+
ENUMERATOR(MinusDstCompositeOp)
|
1208
|
+
ENUMERATOR(MinusSrcCompositeOp)
|
1209
|
+
ENUMERATOR(ModulateCompositeOp)
|
1210
|
+
ENUMERATOR(ModulusAddCompositeOp)
|
1211
|
+
ENUMERATOR(ModulusSubtractCompositeOp)
|
1212
|
+
ENUMERATOR(MultiplyCompositeOp)
|
1213
|
+
ENUMERATOR(NoCompositeOp)
|
1214
|
+
ENUMERATOR(OutCompositeOp)
|
1215
|
+
ENUMERATOR(OverCompositeOp)
|
1216
|
+
ENUMERATOR(OverlayCompositeOp)
|
1217
|
+
ENUMERATOR(PegtopLightCompositeOp)
|
1218
|
+
ENUMERATOR(PinLightCompositeOp)
|
1219
|
+
ENUMERATOR(PlusCompositeOp)
|
1220
|
+
ENUMERATOR(ReplaceCompositeOp) // synonym for CopyCompositeOp
|
1221
|
+
ENUMERATOR(SaturateCompositeOp)
|
1222
|
+
ENUMERATOR(ScreenCompositeOp)
|
1223
|
+
ENUMERATOR(SoftLightCompositeOp)
|
1224
|
+
ENUMERATOR(SrcAtopCompositeOp)
|
1225
|
+
ENUMERATOR(SrcCompositeOp)
|
1226
|
+
ENUMERATOR(SrcInCompositeOp)
|
1227
|
+
ENUMERATOR(SrcOutCompositeOp)
|
1228
|
+
ENUMERATOR(SrcOverCompositeOp)
|
1229
|
+
ENUMERATOR(ThresholdCompositeOp)
|
1230
|
+
ENUMERATOR(UndefinedCompositeOp)
|
1231
|
+
ENUMERATOR(VividLightCompositeOp)
|
1232
|
+
ENUMERATOR(XorCompositeOp)
|
1233
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1234
|
+
ENUMERATOR(HardMixCompositeOp)
|
1235
|
+
#endif
|
1236
|
+
#if defined(IMAGEMAGICK_7)
|
1237
|
+
ENUMERATOR(CopyAlphaCompositeOp)
|
1238
|
+
#else
|
1239
|
+
ENUMERATORV(CopyAlphaCompositeOp, CopyOpacityCompositeOp)
|
1240
|
+
#endif
|
1241
|
+
END_ENUM
|
1242
|
+
|
1243
|
+
// CompressionType constants
|
1244
|
+
DEF_ENUM(CompressionType)
|
1245
|
+
ENUMERATOR(UndefinedCompression)
|
1246
|
+
ENUMERATOR(NoCompression)
|
1247
|
+
ENUMERATOR(B44Compression)
|
1248
|
+
ENUMERATOR(B44ACompression)
|
1249
|
+
ENUMERATOR(BZipCompression)
|
1250
|
+
ENUMERATOR(DXT1Compression)
|
1251
|
+
ENUMERATOR(DXT3Compression)
|
1252
|
+
ENUMERATOR(DXT5Compression)
|
1253
|
+
ENUMERATOR(FaxCompression)
|
1254
|
+
ENUMERATOR(Group4Compression)
|
1255
|
+
ENUMERATOR(JPEGCompression)
|
1256
|
+
ENUMERATOR(JPEG2000Compression)
|
1257
|
+
ENUMERATOR(LosslessJPEGCompression)
|
1258
|
+
ENUMERATOR(LZWCompression)
|
1259
|
+
ENUMERATOR(PizCompression)
|
1260
|
+
ENUMERATOR(Pxr24Compression)
|
1261
|
+
ENUMERATOR(RLECompression)
|
1262
|
+
ENUMERATOR(ZipCompression)
|
1263
|
+
ENUMERATOR(ZipSCompression)
|
1264
|
+
ENUMERATOR(LZMACompression)
|
1265
|
+
ENUMERATOR(JBIG1Compression)
|
1266
|
+
ENUMERATOR(JBIG2Compression)
|
1267
|
+
END_ENUM
|
1268
|
+
|
1269
|
+
// DecorationType constants
|
1270
|
+
DEF_ENUM(DecorationType)
|
1271
|
+
ENUMERATOR(NoDecoration)
|
1272
|
+
ENUMERATOR(UnderlineDecoration)
|
1273
|
+
ENUMERATOR(OverlineDecoration)
|
1274
|
+
ENUMERATOR(LineThroughDecoration)
|
1275
|
+
END_ENUM
|
1276
|
+
|
1277
|
+
// DisposeType constants
|
1278
|
+
DEF_ENUM(DisposeType)
|
1279
|
+
ENUMERATOR(UndefinedDispose)
|
1280
|
+
ENUMERATOR(BackgroundDispose)
|
1281
|
+
ENUMERATOR(NoneDispose)
|
1282
|
+
ENUMERATOR(PreviousDispose)
|
1283
|
+
END_ENUM
|
1284
|
+
|
1285
|
+
// DistortMethod constants
|
1286
|
+
DEF_ENUM(DistortMethod)
|
1287
|
+
ENUMERATOR(UndefinedDistortion)
|
1288
|
+
ENUMERATOR(AffineDistortion)
|
1289
|
+
ENUMERATOR(AffineProjectionDistortion)
|
1290
|
+
ENUMERATOR(ArcDistortion)
|
1291
|
+
ENUMERATOR(PolarDistortion)
|
1292
|
+
ENUMERATOR(DePolarDistortion)
|
1293
|
+
ENUMERATOR(BarrelDistortion)
|
1294
|
+
ENUMERATOR(BilinearDistortion)
|
1295
|
+
ENUMERATOR(BilinearForwardDistortion)
|
1296
|
+
ENUMERATOR(BilinearReverseDistortion)
|
1297
|
+
ENUMERATOR(PerspectiveDistortion)
|
1298
|
+
ENUMERATOR(PerspectiveProjectionDistortion)
|
1299
|
+
ENUMERATOR(PolynomialDistortion)
|
1300
|
+
ENUMERATOR(ScaleRotateTranslateDistortion)
|
1301
|
+
ENUMERATOR(ShepardsDistortion)
|
1302
|
+
ENUMERATOR(BarrelInverseDistortion)
|
1303
|
+
ENUMERATOR(Cylinder2PlaneDistortion)
|
1304
|
+
ENUMERATOR(Plane2CylinderDistortion)
|
1305
|
+
ENUMERATOR(ResizeDistortion)
|
1306
|
+
ENUMERATOR(SentinelDistortion)
|
1307
|
+
END_ENUM
|
1308
|
+
|
1309
|
+
DEF_ENUM(DitherMethod)
|
1310
|
+
ENUMERATOR(UndefinedDitherMethod)
|
1311
|
+
ENUMERATOR(NoDitherMethod)
|
1312
|
+
ENUMERATOR(RiemersmaDitherMethod)
|
1313
|
+
ENUMERATOR(FloydSteinbergDitherMethod)
|
1314
|
+
END_ENUM
|
1315
|
+
|
1316
|
+
DEF_ENUM(EndianType)
|
1317
|
+
ENUMERATOR(UndefinedEndian)
|
1318
|
+
ENUMERATOR(LSBEndian)
|
1319
|
+
ENUMERATOR(MSBEndian)
|
1320
|
+
END_ENUM
|
1321
|
+
|
1322
|
+
// FilterType constants
|
1323
|
+
DEF_ENUM(FilterType)
|
1324
|
+
ENUMERATOR(UndefinedFilter)
|
1325
|
+
ENUMERATOR(PointFilter)
|
1326
|
+
ENUMERATOR(BoxFilter)
|
1327
|
+
ENUMERATOR(TriangleFilter)
|
1328
|
+
ENUMERATOR(HermiteFilter)
|
1329
|
+
ENUMERATOR(HanningFilter)
|
1330
|
+
ENUMERATOR(HammingFilter)
|
1331
|
+
ENUMERATOR(BlackmanFilter)
|
1332
|
+
ENUMERATOR(GaussianFilter)
|
1333
|
+
ENUMERATOR(QuadraticFilter)
|
1334
|
+
ENUMERATOR(CubicFilter)
|
1335
|
+
ENUMERATOR(CatromFilter)
|
1336
|
+
ENUMERATOR(MitchellFilter)
|
1337
|
+
ENUMERATOR(LanczosFilter)
|
1338
|
+
ENUMERATOR(BesselFilter)
|
1339
|
+
ENUMERATOR(SincFilter)
|
1340
|
+
ENUMERATOR(KaiserFilter)
|
1341
|
+
ENUMERATOR(WelshFilter)
|
1342
|
+
ENUMERATOR(ParzenFilter)
|
1343
|
+
ENUMERATOR(LagrangeFilter)
|
1344
|
+
ENUMERATOR(BohmanFilter)
|
1345
|
+
ENUMERATOR(BartlettFilter)
|
1346
|
+
ENUMERATOR(JincFilter)
|
1347
|
+
ENUMERATOR(SincFastFilter)
|
1348
|
+
ENUMERATOR(LanczosSharpFilter)
|
1349
|
+
ENUMERATOR(Lanczos2Filter)
|
1350
|
+
ENUMERATOR(Lanczos2SharpFilter)
|
1351
|
+
ENUMERATOR(RobidouxFilter)
|
1352
|
+
ENUMERATOR(RobidouxSharpFilter)
|
1353
|
+
ENUMERATOR(CosineFilter)
|
1354
|
+
ENUMERATOR(SplineFilter)
|
1355
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1356
|
+
ENUMERATOR(LanczosRadiusFilter)
|
1357
|
+
#endif
|
1358
|
+
ENUMERATORV(WelchFilter, WelshFilter)
|
1359
|
+
ENUMERATORV(HannFilter, HanningFilter)
|
1360
|
+
END_ENUM
|
1361
|
+
|
1362
|
+
// GravityType constants
|
1363
|
+
DEF_ENUM(GravityType)
|
1364
|
+
ENUMERATOR(UndefinedGravity)
|
1365
|
+
ENUMERATOR(ForgetGravity)
|
1366
|
+
ENUMERATOR(NorthWestGravity)
|
1367
|
+
ENUMERATOR(NorthGravity)
|
1368
|
+
ENUMERATOR(NorthEastGravity)
|
1369
|
+
ENUMERATOR(WestGravity)
|
1370
|
+
ENUMERATOR(CenterGravity)
|
1371
|
+
ENUMERATOR(EastGravity)
|
1372
|
+
ENUMERATOR(SouthWestGravity)
|
1373
|
+
ENUMERATOR(SouthGravity)
|
1374
|
+
ENUMERATOR(SouthEastGravity)
|
1375
|
+
END_ENUM
|
1376
|
+
|
1377
|
+
// ImageType constants
|
1378
|
+
DEF_ENUM(ImageType)
|
1379
|
+
ENUMERATOR(UndefinedType)
|
1380
|
+
ENUMERATOR(BilevelType)
|
1381
|
+
ENUMERATOR(GrayscaleType)
|
1382
|
+
ENUMERATOR(PaletteType)
|
1383
|
+
ENUMERATOR(TrueColorType)
|
1384
|
+
ENUMERATOR(ColorSeparationType)
|
1385
|
+
ENUMERATOR(OptimizeType)
|
1386
|
+
#if defined(IMAGEMAGICK_7)
|
1387
|
+
ENUMERATOR(GrayscaleAlphaType)
|
1388
|
+
ENUMERATOR(PaletteAlphaType)
|
1389
|
+
ENUMERATOR(TrueColorAlphaType)
|
1390
|
+
ENUMERATOR(ColorSeparationAlphaType)
|
1391
|
+
ENUMERATOR(PaletteBilevelAlphaType)
|
1392
|
+
#else
|
1393
|
+
ENUMERATORV(GrayscaleAlphaType, GrayscaleMatteType)
|
1394
|
+
ENUMERATORV(PaletteAlphaType, PaletteMatteType)
|
1395
|
+
ENUMERATORV(TrueColorAlphaType, TrueColorMatteType)
|
1396
|
+
ENUMERATORV(ColorSeparationAlphaType, ColorSeparationMatteType)
|
1397
|
+
ENUMERATORV(PaletteBilevelAlphaType, PaletteBilevelMatteType)
|
1398
|
+
#endif
|
1399
|
+
END_ENUM
|
1400
|
+
|
1401
|
+
// InterlaceType constants
|
1402
|
+
DEF_ENUM(InterlaceType)
|
1403
|
+
ENUMERATOR(UndefinedInterlace)
|
1404
|
+
ENUMERATOR(NoInterlace)
|
1405
|
+
ENUMERATOR(LineInterlace)
|
1406
|
+
ENUMERATOR(PlaneInterlace)
|
1407
|
+
ENUMERATOR(PartitionInterlace)
|
1408
|
+
ENUMERATOR(GIFInterlace)
|
1409
|
+
ENUMERATOR(JPEGInterlace)
|
1410
|
+
ENUMERATOR(PNGInterlace)
|
1411
|
+
END_ENUM
|
1412
|
+
|
1413
|
+
DEF_ENUM(MagickFunction)
|
1414
|
+
ENUMERATOR(UndefinedFunction)
|
1415
|
+
ENUMERATOR(PolynomialFunction)
|
1416
|
+
ENUMERATOR(SinusoidFunction)
|
1417
|
+
ENUMERATOR(ArcsinFunction)
|
1418
|
+
ENUMERATOR(ArctanFunction)
|
1419
|
+
END_ENUM
|
1420
|
+
|
1421
|
+
DEF_ENUM(LayerMethod)
|
1422
|
+
ENUMERATOR(UndefinedLayer)
|
1423
|
+
ENUMERATOR(CompareAnyLayer)
|
1424
|
+
ENUMERATOR(CompareClearLayer)
|
1425
|
+
ENUMERATOR(CompareOverlayLayer)
|
1426
|
+
ENUMERATOR(OptimizeLayer)
|
1427
|
+
ENUMERATOR(OptimizePlusLayer)
|
1428
|
+
ENUMERATOR(CoalesceLayer)
|
1429
|
+
ENUMERATOR(DisposeLayer)
|
1430
|
+
ENUMERATOR(OptimizeTransLayer)
|
1431
|
+
ENUMERATOR(OptimizeImageLayer)
|
1432
|
+
ENUMERATOR(RemoveDupsLayer)
|
1433
|
+
ENUMERATOR(RemoveZeroLayer)
|
1434
|
+
ENUMERATOR(CompositeLayer)
|
1435
|
+
ENUMERATOR(MergeLayer)
|
1436
|
+
ENUMERATOR(MosaicLayer)
|
1437
|
+
ENUMERATOR(FlattenLayer)
|
1438
|
+
ENUMERATOR(TrimBoundsLayer)
|
1439
|
+
END_ENUM
|
1440
|
+
|
1441
|
+
DEF_ENUM(MetricType)
|
1442
|
+
ENUMERATOR(AbsoluteErrorMetric)
|
1443
|
+
ENUMERATOR(MeanAbsoluteErrorMetric)
|
1444
|
+
ENUMERATOR(MeanSquaredErrorMetric)
|
1445
|
+
ENUMERATOR(PeakAbsoluteErrorMetric)
|
1446
|
+
ENUMERATOR(RootMeanSquaredErrorMetric)
|
1447
|
+
ENUMERATOR(NormalizedCrossCorrelationErrorMetric)
|
1448
|
+
ENUMERATOR(FuzzErrorMetric)
|
1449
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1450
|
+
ENUMERATOR(PerceptualHashErrorMetric)
|
1451
|
+
#endif
|
1452
|
+
#if defined(IMAGEMAGICK_7)
|
1453
|
+
ENUMERATOR(UndefinedErrorMetric)
|
1454
|
+
ENUMERATOR(MeanErrorPerPixelErrorMetric)
|
1455
|
+
ENUMERATOR(PeakSignalToNoiseRatioErrorMetric)
|
1456
|
+
#else
|
1457
|
+
ENUMERATORV(UndefinedErrorMetric, UndefinedMetric)
|
1458
|
+
ENUMERATORV(MeanErrorPerPixelErrorMetric, MeanErrorPerPixelMetric)
|
1459
|
+
ENUMERATORV(PeakSignalToNoiseRatioErrorMetric, PeakSignalToNoiseRatioMetric)
|
1460
|
+
#endif
|
1461
|
+
END_ENUM
|
1462
|
+
|
1463
|
+
// NoiseType constants
|
1464
|
+
DEF_ENUM(NoiseType)
|
1465
|
+
ENUMERATOR(UniformNoise)
|
1466
|
+
ENUMERATOR(GaussianNoise)
|
1467
|
+
ENUMERATOR(MultiplicativeGaussianNoise)
|
1468
|
+
ENUMERATOR(ImpulseNoise)
|
1469
|
+
ENUMERATOR(LaplacianNoise)
|
1470
|
+
ENUMERATOR(PoissonNoise)
|
1471
|
+
ENUMERATOR(RandomNoise)
|
1472
|
+
END_ENUM
|
1473
|
+
|
1474
|
+
// Orientation constants
|
1475
|
+
DEF_ENUM(OrientationType)
|
1476
|
+
ENUMERATOR(UndefinedOrientation)
|
1477
|
+
ENUMERATOR(TopLeftOrientation)
|
1478
|
+
ENUMERATOR(TopRightOrientation)
|
1479
|
+
ENUMERATOR(BottomRightOrientation)
|
1480
|
+
ENUMERATOR(BottomLeftOrientation)
|
1481
|
+
ENUMERATOR(LeftTopOrientation)
|
1482
|
+
ENUMERATOR(RightTopOrientation)
|
1483
|
+
ENUMERATOR(RightBottomOrientation)
|
1484
|
+
ENUMERATOR(LeftBottomOrientation)
|
1485
|
+
END_ENUM
|
1486
|
+
|
1487
|
+
// Paint method constants
|
1488
|
+
DEF_ENUM(PaintMethod)
|
1489
|
+
ENUMERATOR(PointMethod)
|
1490
|
+
ENUMERATOR(ReplaceMethod)
|
1491
|
+
ENUMERATOR(FloodfillMethod)
|
1492
|
+
ENUMERATOR(FillToBorderMethod)
|
1493
|
+
ENUMERATOR(ResetMethod)
|
1494
|
+
END_ENUM
|
1495
|
+
|
1496
|
+
// PixelInterpolateMethod constants
|
1497
|
+
DEF_ENUM(PixelInterpolateMethod)
|
1498
|
+
ENUMERATOR(UndefinedInterpolatePixel)
|
1499
|
+
ENUMERATOR(AverageInterpolatePixel)
|
1500
|
+
ENUMERATOR(BilinearInterpolatePixel)
|
1501
|
+
ENUMERATOR(IntegerInterpolatePixel)
|
1502
|
+
ENUMERATOR(MeshInterpolatePixel)
|
1503
|
+
#if defined(IMAGEMAGICK_7)
|
1504
|
+
ENUMERATOR(NearestInterpolatePixel)
|
1505
|
+
#else
|
1506
|
+
ENUMERATORV(NearestInterpolatePixel, NearestNeighborInterpolatePixel)
|
1507
|
+
#endif
|
1508
|
+
ENUMERATOR(SplineInterpolatePixel)
|
1509
|
+
ENUMERATOR(Average9InterpolatePixel)
|
1510
|
+
ENUMERATOR(Average16InterpolatePixel)
|
1511
|
+
ENUMERATOR(BlendInterpolatePixel)
|
1512
|
+
ENUMERATOR(BackgroundInterpolatePixel)
|
1513
|
+
ENUMERATOR(CatromInterpolatePixel)
|
1514
|
+
END_ENUM
|
1515
|
+
|
1516
|
+
// PreviewType
|
1517
|
+
DEF_ENUM(PreviewType)
|
1518
|
+
ENUMERATOR(UndefinedPreview)
|
1519
|
+
ENUMERATOR(RotatePreview)
|
1520
|
+
ENUMERATOR(ShearPreview)
|
1521
|
+
ENUMERATOR(RollPreview)
|
1522
|
+
ENUMERATOR(HuePreview)
|
1523
|
+
ENUMERATOR(SaturationPreview)
|
1524
|
+
ENUMERATOR(BrightnessPreview)
|
1525
|
+
ENUMERATOR(GammaPreview)
|
1526
|
+
ENUMERATOR(SpiffPreview)
|
1527
|
+
ENUMERATOR(DullPreview)
|
1528
|
+
ENUMERATOR(GrayscalePreview)
|
1529
|
+
ENUMERATOR(QuantizePreview)
|
1530
|
+
ENUMERATOR(DespecklePreview)
|
1531
|
+
ENUMERATOR(ReduceNoisePreview)
|
1532
|
+
ENUMERATOR(AddNoisePreview)
|
1533
|
+
ENUMERATOR(SharpenPreview)
|
1534
|
+
ENUMERATOR(BlurPreview)
|
1535
|
+
ENUMERATOR(ThresholdPreview)
|
1536
|
+
ENUMERATOR(EdgeDetectPreview)
|
1537
|
+
ENUMERATOR(SpreadPreview)
|
1538
|
+
ENUMERATOR(SolarizePreview)
|
1539
|
+
ENUMERATOR(ShadePreview)
|
1540
|
+
ENUMERATOR(RaisePreview)
|
1541
|
+
ENUMERATOR(SegmentPreview)
|
1542
|
+
ENUMERATOR(SwirlPreview)
|
1543
|
+
ENUMERATOR(ImplodePreview)
|
1544
|
+
ENUMERATOR(WavePreview)
|
1545
|
+
ENUMERATOR(OilPaintPreview)
|
1546
|
+
ENUMERATOR(CharcoalDrawingPreview)
|
1547
|
+
ENUMERATOR(JPEGPreview)
|
1548
|
+
END_ENUM
|
1549
|
+
|
1550
|
+
DEF_ENUM(QuantumExpressionOperator)
|
1551
|
+
ENUMERATOR(UndefinedQuantumOperator)
|
1552
|
+
ENUMERATOR(AddQuantumOperator)
|
1553
|
+
ENUMERATOR(AndQuantumOperator)
|
1554
|
+
ENUMERATOR(DivideQuantumOperator)
|
1555
|
+
ENUMERATOR(LShiftQuantumOperator)
|
1556
|
+
ENUMERATOR(MaxQuantumOperator)
|
1557
|
+
ENUMERATOR(MinQuantumOperator)
|
1558
|
+
ENUMERATOR(MultiplyQuantumOperator)
|
1559
|
+
ENUMERATOR(OrQuantumOperator)
|
1560
|
+
ENUMERATOR(RShiftQuantumOperator)
|
1561
|
+
ENUMERATOR(SubtractQuantumOperator)
|
1562
|
+
ENUMERATOR(XorQuantumOperator)
|
1563
|
+
ENUMERATOR(PowQuantumOperator)
|
1564
|
+
ENUMERATOR(LogQuantumOperator)
|
1565
|
+
ENUMERATOR(ThresholdQuantumOperator)
|
1566
|
+
ENUMERATOR(ThresholdBlackQuantumOperator)
|
1567
|
+
ENUMERATOR(ThresholdWhiteQuantumOperator)
|
1568
|
+
ENUMERATOR(GaussianNoiseQuantumOperator)
|
1569
|
+
ENUMERATOR(ImpulseNoiseQuantumOperator)
|
1570
|
+
ENUMERATOR(LaplacianNoiseQuantumOperator)
|
1571
|
+
ENUMERATOR(MultiplicativeNoiseQuantumOperator)
|
1572
|
+
ENUMERATOR(PoissonNoiseQuantumOperator)
|
1573
|
+
ENUMERATOR(UniformNoiseQuantumOperator)
|
1574
|
+
ENUMERATOR(CosineQuantumOperator)
|
1575
|
+
ENUMERATOR(SetQuantumOperator)
|
1576
|
+
ENUMERATOR(SineQuantumOperator)
|
1577
|
+
ENUMERATOR(AddModulusQuantumOperator)
|
1578
|
+
ENUMERATOR(MeanQuantumOperator)
|
1579
|
+
ENUMERATOR(AbsQuantumOperator)
|
1580
|
+
ENUMERATOR(ExponentialQuantumOperator)
|
1581
|
+
ENUMERATOR(MedianQuantumOperator)
|
1582
|
+
ENUMERATOR(SumQuantumOperator)
|
1583
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1584
|
+
ENUMERATOR(RootMeanSquareQuantumOperator)
|
1585
|
+
#endif
|
1586
|
+
END_ENUM
|
1587
|
+
|
1588
|
+
// RenderingIntent
|
1589
|
+
DEF_ENUM(RenderingIntent)
|
1590
|
+
ENUMERATOR(UndefinedIntent)
|
1591
|
+
ENUMERATOR(SaturationIntent)
|
1592
|
+
ENUMERATOR(PerceptualIntent)
|
1593
|
+
ENUMERATOR(AbsoluteIntent)
|
1594
|
+
ENUMERATOR(RelativeIntent)
|
1595
|
+
END_ENUM
|
1596
|
+
|
1597
|
+
// ResolutionType constants
|
1598
|
+
DEF_ENUM(ResolutionType)
|
1599
|
+
ENUMERATOR(UndefinedResolution)
|
1600
|
+
ENUMERATOR(PixelsPerInchResolution)
|
1601
|
+
ENUMERATOR(PixelsPerCentimeterResolution)
|
1602
|
+
END_ENUM
|
1603
|
+
|
1604
|
+
DEF_ENUM(SparseColorMethod)
|
1605
|
+
ENUMERATOR(UndefinedColorInterpolate)
|
1606
|
+
ENUMERATOR(BarycentricColorInterpolate)
|
1607
|
+
ENUMERATOR(BilinearColorInterpolate)
|
1608
|
+
//ENUMERATOR(PolynomialColorInterpolate)
|
1609
|
+
ENUMERATOR(ShepardsColorInterpolate)
|
1610
|
+
ENUMERATOR(VoronoiColorInterpolate)
|
1611
|
+
ENUMERATOR(InverseColorInterpolate)
|
1612
|
+
END_ENUM
|
1613
|
+
|
1614
|
+
// SpreadMethod
|
1615
|
+
DEF_ENUM(SpreadMethod)
|
1616
|
+
ENUMERATOR(UndefinedSpread)
|
1617
|
+
ENUMERATOR(PadSpread)
|
1618
|
+
ENUMERATOR(ReflectSpread)
|
1619
|
+
ENUMERATOR(RepeatSpread)
|
1620
|
+
END_ENUM
|
1621
|
+
|
1622
|
+
// StorageType
|
1623
|
+
DEF_ENUM(StorageType)
|
1624
|
+
ENUMERATOR(UndefinedPixel)
|
1625
|
+
ENUMERATOR(CharPixel)
|
1626
|
+
ENUMERATOR(DoublePixel)
|
1627
|
+
ENUMERATOR(FloatPixel)
|
1628
|
+
ENUMERATOR(LongPixel)
|
1629
|
+
ENUMERATOR(QuantumPixel)
|
1630
|
+
ENUMERATOR(ShortPixel)
|
1631
|
+
END_ENUM
|
1632
|
+
|
1633
|
+
// StretchType constants
|
1634
|
+
DEF_ENUM(StretchType)
|
1635
|
+
ENUMERATOR(NormalStretch)
|
1636
|
+
ENUMERATOR(UltraCondensedStretch)
|
1637
|
+
ENUMERATOR(ExtraCondensedStretch)
|
1638
|
+
ENUMERATOR(CondensedStretch)
|
1639
|
+
ENUMERATOR(SemiCondensedStretch)
|
1640
|
+
ENUMERATOR(SemiExpandedStretch)
|
1641
|
+
ENUMERATOR(ExpandedStretch)
|
1642
|
+
ENUMERATOR(ExtraExpandedStretch)
|
1643
|
+
ENUMERATOR(UltraExpandedStretch)
|
1644
|
+
ENUMERATOR(AnyStretch)
|
1645
|
+
END_ENUM
|
1646
|
+
|
1647
|
+
// StyleType constants
|
1648
|
+
DEF_ENUM(StyleType)
|
1649
|
+
ENUMERATOR(NormalStyle)
|
1650
|
+
ENUMERATOR(ItalicStyle)
|
1651
|
+
ENUMERATOR(ObliqueStyle)
|
1652
|
+
ENUMERATOR(AnyStyle)
|
1653
|
+
END_ENUM
|
1654
|
+
|
1655
|
+
// VirtualPixelMethod
|
1656
|
+
DEF_ENUM(VirtualPixelMethod)
|
1657
|
+
ENUMERATOR(UndefinedVirtualPixelMethod)
|
1658
|
+
ENUMERATOR(EdgeVirtualPixelMethod)
|
1659
|
+
ENUMERATOR(MirrorVirtualPixelMethod)
|
1660
|
+
ENUMERATOR(TileVirtualPixelMethod)
|
1661
|
+
ENUMERATOR(TransparentVirtualPixelMethod)
|
1662
|
+
ENUMERATOR(BackgroundVirtualPixelMethod)
|
1663
|
+
ENUMERATOR(DitherVirtualPixelMethod)
|
1664
|
+
ENUMERATOR(RandomVirtualPixelMethod)
|
1665
|
+
ENUMERATOR(MaskVirtualPixelMethod)
|
1666
|
+
ENUMERATOR(BlackVirtualPixelMethod)
|
1667
|
+
ENUMERATOR(GrayVirtualPixelMethod)
|
1668
|
+
ENUMERATOR(WhiteVirtualPixelMethod)
|
1669
|
+
ENUMERATOR(HorizontalTileVirtualPixelMethod)
|
1670
|
+
ENUMERATOR(VerticalTileVirtualPixelMethod)
|
1671
|
+
ENUMERATOR(HorizontalTileEdgeVirtualPixelMethod)
|
1672
|
+
ENUMERATOR(VerticalTileEdgeVirtualPixelMethod)
|
1673
|
+
ENUMERATOR(CheckerTileVirtualPixelMethod)
|
1674
|
+
END_ENUM
|
1675
|
+
// WeightType constants
|
1676
|
+
DEF_ENUM(WeightType)
|
1677
|
+
ENUMERATOR(AnyWeight)
|
1678
|
+
ENUMERATOR(NormalWeight)
|
1679
|
+
ENUMERATOR(BoldWeight)
|
1680
|
+
ENUMERATOR(BolderWeight)
|
1681
|
+
ENUMERATOR(LighterWeight)
|
1682
|
+
END_ENUM
|
1683
|
+
|
1684
|
+
// For KernelInfo scaling
|
1685
|
+
DEF_ENUM(GeometryFlags)
|
1686
|
+
ENUMERATOR(NoValue)
|
1687
|
+
ENUMERATOR(XValue)
|
1688
|
+
ENUMERATOR(XiValue)
|
1689
|
+
ENUMERATOR(YValue)
|
1690
|
+
ENUMERATOR(PsiValue)
|
1691
|
+
ENUMERATOR(WidthValue)
|
1692
|
+
ENUMERATOR(RhoValue)
|
1693
|
+
ENUMERATOR(HeightValue)
|
1694
|
+
ENUMERATOR(SigmaValue)
|
1695
|
+
ENUMERATOR(ChiValue)
|
1696
|
+
ENUMERATOR(XiNegative)
|
1697
|
+
ENUMERATOR(XNegative)
|
1698
|
+
ENUMERATOR(PsiNegative)
|
1699
|
+
ENUMERATOR(YNegative)
|
1700
|
+
ENUMERATOR(ChiNegative)
|
1701
|
+
ENUMERATOR(PercentValue)
|
1702
|
+
ENUMERATOR(AspectValue)
|
1703
|
+
ENUMERATOR(NormalizeValue)
|
1704
|
+
ENUMERATOR(LessValue)
|
1705
|
+
ENUMERATOR(GreaterValue)
|
1706
|
+
ENUMERATOR(MinimumValue)
|
1707
|
+
ENUMERATOR(CorrelateNormalizeValue)
|
1708
|
+
ENUMERATOR(AreaValue)
|
1709
|
+
ENUMERATOR(DecimalValue)
|
1710
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1711
|
+
ENUMERATOR(SeparatorValue)
|
1712
|
+
#endif
|
1713
|
+
ENUMERATOR(AllValues)
|
1714
|
+
END_ENUM
|
1715
|
+
|
1716
|
+
// Morphology methods
|
1717
|
+
DEF_ENUM(MorphologyMethod)
|
1718
|
+
ENUMERATOR(UndefinedMorphology)
|
1719
|
+
ENUMERATOR(ConvolveMorphology)
|
1720
|
+
ENUMERATOR(CorrelateMorphology)
|
1721
|
+
ENUMERATOR(ErodeMorphology)
|
1722
|
+
ENUMERATOR(DilateMorphology)
|
1723
|
+
ENUMERATOR(ErodeIntensityMorphology)
|
1724
|
+
ENUMERATOR(DilateIntensityMorphology)
|
1725
|
+
ENUMERATOR(DistanceMorphology)
|
1726
|
+
ENUMERATOR(OpenMorphology)
|
1727
|
+
ENUMERATOR(CloseMorphology)
|
1728
|
+
ENUMERATOR(OpenIntensityMorphology)
|
1729
|
+
ENUMERATOR(CloseIntensityMorphology)
|
1730
|
+
ENUMERATOR(SmoothMorphology)
|
1731
|
+
ENUMERATOR(EdgeInMorphology)
|
1732
|
+
ENUMERATOR(EdgeOutMorphology)
|
1733
|
+
ENUMERATOR(EdgeMorphology)
|
1734
|
+
ENUMERATOR(TopHatMorphology)
|
1735
|
+
ENUMERATOR(BottomHatMorphology)
|
1736
|
+
ENUMERATOR(HitAndMissMorphology)
|
1737
|
+
ENUMERATOR(ThinningMorphology)
|
1738
|
+
ENUMERATOR(ThickenMorphology)
|
1739
|
+
ENUMERATOR(VoronoiMorphology)
|
1740
|
+
ENUMERATOR(IterativeDistanceMorphology)
|
1741
|
+
END_ENUM
|
1742
|
+
|
1743
|
+
DEF_ENUM(KernelInfoType)
|
1744
|
+
ENUMERATOR(UndefinedKernel)
|
1745
|
+
ENUMERATOR(UnityKernel)
|
1746
|
+
ENUMERATOR(GaussianKernel)
|
1747
|
+
ENUMERATOR(DoGKernel)
|
1748
|
+
ENUMERATOR(LoGKernel)
|
1749
|
+
ENUMERATOR(BlurKernel)
|
1750
|
+
ENUMERATOR(CometKernel)
|
1751
|
+
ENUMERATOR(LaplacianKernel)
|
1752
|
+
ENUMERATOR(SobelKernel)
|
1753
|
+
ENUMERATOR(FreiChenKernel)
|
1754
|
+
ENUMERATOR(RobertsKernel)
|
1755
|
+
ENUMERATOR(PrewittKernel)
|
1756
|
+
ENUMERATOR(CompassKernel)
|
1757
|
+
ENUMERATOR(KirschKernel)
|
1758
|
+
ENUMERATOR(DiamondKernel)
|
1759
|
+
ENUMERATOR(SquareKernel)
|
1760
|
+
ENUMERATOR(RectangleKernel)
|
1761
|
+
ENUMERATOR(OctagonKernel)
|
1762
|
+
ENUMERATOR(DiskKernel)
|
1763
|
+
ENUMERATOR(PlusKernel)
|
1764
|
+
ENUMERATOR(CrossKernel)
|
1765
|
+
ENUMERATOR(RingKernel)
|
1766
|
+
ENUMERATOR(PeaksKernel)
|
1767
|
+
ENUMERATOR(EdgesKernel)
|
1768
|
+
ENUMERATOR(CornersKernel)
|
1769
|
+
ENUMERATOR(DiagonalsKernel)
|
1770
|
+
ENUMERATOR(LineEndsKernel)
|
1771
|
+
ENUMERATOR(LineJunctionsKernel)
|
1772
|
+
ENUMERATOR(RidgesKernel)
|
1773
|
+
ENUMERATOR(ConvexHullKernel)
|
1774
|
+
ENUMERATOR(ThinSEKernel)
|
1775
|
+
ENUMERATOR(SkeletonKernel)
|
1776
|
+
ENUMERATOR(ChebyshevKernel)
|
1777
|
+
ENUMERATOR(ManhattanKernel)
|
1778
|
+
ENUMERATOR(OctagonalKernel)
|
1779
|
+
ENUMERATOR(EuclideanKernel)
|
1780
|
+
ENUMERATOR(UserDefinedKernel)
|
1781
|
+
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
1782
|
+
ENUMERATOR(BinomialKernel)
|
1783
|
+
#endif
|
1784
|
+
END_ENUM
|
1785
|
+
|
1786
|
+
/*-----------------------------------------------------------------------*/
|
1787
|
+
/* Struct classes */
|
1788
|
+
/*-----------------------------------------------------------------------*/
|
1789
|
+
|
1790
|
+
// Pass NULL as the structure name to keep them from polluting the Struct
|
1791
|
+
// namespace. The only way to use these classes is via the Magick:: namespace.
|
1792
|
+
|
1793
|
+
// Magick::AffineMatrix
|
1794
|
+
Class_AffineMatrix = rb_struct_define_under(Module_Magick, "AffineMatrix",
|
1795
|
+
"sx", "rx", "ry", "sy", "tx", "ty", NULL);
|
1796
|
+
|
1797
|
+
// Magick::Primary
|
1798
|
+
Class_Primary = rb_struct_define_under(Module_Magick, "Primary",
|
1799
|
+
"x", "y", "z", NULL);
|
1800
|
+
rb_define_method(Class_Primary, "to_s", RUBY_METHOD_FUNC(PrimaryInfo_to_s), 0);
|
1801
|
+
|
1802
|
+
// Magick::Chromaticity
|
1803
|
+
Class_Chromaticity = rb_struct_define_under(Module_Magick, "Chromaticity",
|
1804
|
+
"red_primary", "green_primary",
|
1805
|
+
"blue_primary", "white_point", NULL);
|
1806
|
+
rb_define_method(Class_Chromaticity, "to_s", RUBY_METHOD_FUNC(ChromaticityInfo_to_s), 0);
|
1807
|
+
|
1808
|
+
// Magick::Color
|
1809
|
+
Class_Color = rb_struct_define_under(Module_Magick, "Color",
|
1810
|
+
"name", "compliance", "color", NULL);
|
1811
|
+
rb_define_method(Class_Color, "to_s", RUBY_METHOD_FUNC(Color_to_s), 0);
|
1812
|
+
|
1813
|
+
// Magick::Point
|
1814
|
+
Class_Point = rb_struct_define_under(Module_Magick, "Point",
|
1815
|
+
"x", "y", NULL);
|
1816
|
+
|
1817
|
+
// Magick::Rectangle
|
1818
|
+
Class_Rectangle = rb_struct_define_under(Module_Magick, "Rectangle",
|
1819
|
+
"width", "height", "x", "y", NULL);
|
1820
|
+
rb_define_method(Class_Rectangle, "to_s", RUBY_METHOD_FUNC(RectangleInfo_to_s), 0);
|
1821
|
+
|
1822
|
+
// Magick::Segment
|
1823
|
+
Class_Segment = rb_struct_define_under(Module_Magick, "Segment",
|
1824
|
+
"x1", "y1", "x2", "y2", NULL);
|
1825
|
+
rb_define_method(Class_Segment, "to_s", RUBY_METHOD_FUNC(SegmentInfo_to_s), 0);
|
1826
|
+
|
1827
|
+
// Magick::Font
|
1828
|
+
Class_Font = rb_struct_define_under(Module_Magick, "Font",
|
1829
|
+
"name", "description",
|
1830
|
+
"family", "style", "stretch", "weight",
|
1831
|
+
"encoding", "foundry", "format", NULL);
|
1832
|
+
rb_define_method(Class_Font, "to_s", RUBY_METHOD_FUNC(Font_to_s), 0);
|
1833
|
+
|
1834
|
+
// Magick::TypeMetric
|
1835
|
+
Class_TypeMetric = rb_struct_define_under(Module_Magick, "TypeMetric",
|
1836
|
+
"pixels_per_em", "ascent", "descent",
|
1837
|
+
"width", "height", "max_advance", "bounds",
|
1838
|
+
"underline_position", "underline_thickness", NULL);
|
1839
|
+
rb_define_method(Class_TypeMetric, "to_s", RUBY_METHOD_FUNC(TypeMetric_to_s), 0);
|
1840
|
+
|
1841
|
+
|
1842
|
+
/*-----------------------------------------------------------------------*/
|
1843
|
+
/* Error handlers */
|
1844
|
+
/*-----------------------------------------------------------------------*/
|
1845
|
+
|
1846
|
+
SetFatalErrorHandler(rm_fatal_error_handler);
|
1847
|
+
SetErrorHandler(rm_error_handler);
|
1848
|
+
SetWarningHandler(rm_warning_handler);
|
1849
|
+
}
|
1850
|
+
|
1851
|
+
|
1852
|
+
|
1853
|
+
|
1854
|
+
/**
|
1855
|
+
* Ensure the version of ImageMagick we're running with matches the version we
|
1856
|
+
* were compiled with.
|
1857
|
+
*
|
1858
|
+
* No Ruby usage (internal function)
|
1859
|
+
*
|
1860
|
+
* Notes:
|
1861
|
+
* - Bypass the test by defining the constant RMAGICK_BYPASS_VERSION_TEST to
|
1862
|
+
* 'true' at the top level, before requiring 'rmagick'
|
1863
|
+
*/
|
1864
|
+
static void
|
1865
|
+
test_Magick_version(void)
|
1866
|
+
{
|
1867
|
+
size_t version_number;
|
1868
|
+
const char *version_str;
|
1869
|
+
ID bypass = rb_intern("RMAGICK_BYPASS_VERSION_TEST");
|
1870
|
+
|
1871
|
+
if (RTEST(rb_const_defined(rb_cObject, bypass)) && RTEST(rb_const_get(rb_cObject, bypass)))
|
1872
|
+
{
|
1873
|
+
return;
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
version_str = GetMagickVersion(&version_number);
|
1877
|
+
if (version_number != MagickLibVersion)
|
1878
|
+
{
|
1879
|
+
int n, x;
|
1880
|
+
|
1881
|
+
// Extract the string "ImageMagick X.Y.Z"
|
1882
|
+
n = 0;
|
1883
|
+
for (x = 0; version_str[x] != '\0'; x++)
|
1884
|
+
{
|
1885
|
+
if (version_str[x] == ' ' && ++n == 2)
|
1886
|
+
{
|
1887
|
+
break;
|
1888
|
+
}
|
1889
|
+
}
|
1890
|
+
|
1891
|
+
rb_raise(rb_eRuntimeError,
|
1892
|
+
"This installation of RMagick was configured with %s %s but %.*s is in use.\n"
|
1893
|
+
"Please re-install RMagick to correct the issue.\n",
|
1894
|
+
MagickPackageName, MagickLibVersionText, x, version_str);
|
1895
|
+
}
|
1896
|
+
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
|
1900
|
+
|
1901
|
+
|
1902
|
+
|
1903
|
+
/**
|
1904
|
+
* Create Version, Magick_version, and Version_long constants.
|
1905
|
+
*
|
1906
|
+
* No Ruby usage (internal function)
|
1907
|
+
*/
|
1908
|
+
static void
|
1909
|
+
version_constants(void)
|
1910
|
+
{
|
1911
|
+
const char *mgk_version;
|
1912
|
+
VALUE str;
|
1913
|
+
char long_version[1000];
|
1914
|
+
|
1915
|
+
mgk_version = GetMagickVersion(NULL);
|
1916
|
+
|
1917
|
+
str = rb_str_new2(mgk_version);
|
1918
|
+
rb_obj_freeze(str);
|
1919
|
+
rb_define_const(Module_Magick, "Magick_version", str);
|
1920
|
+
|
1921
|
+
str = rb_str_new2(Q(RMAGICK_VERSION_STRING));
|
1922
|
+
rb_obj_freeze(str);
|
1923
|
+
rb_define_const(Module_Magick, "Version", str);
|
1924
|
+
|
1925
|
+
snprintf(long_version, sizeof(long_version),
|
1926
|
+
"This is %s ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter\n"
|
1927
|
+
"Built with %s\n"
|
1928
|
+
"Built for %s\n"
|
1929
|
+
"Web page: https://rmagick.github.io/\n",
|
1930
|
+
Q(RMAGICK_VERSION_STRING), mgk_version, Q(RUBY_VERSION_STRING));
|
1931
|
+
|
1932
|
+
str = rb_str_new2(long_version);
|
1933
|
+
rb_obj_freeze(str);
|
1934
|
+
rb_define_const(Module_Magick, "Long_version", str);
|
1935
|
+
|
1936
|
+
RB_GC_GUARD(str);
|
1937
|
+
}
|
1938
|
+
|
1939
|
+
|
1940
|
+
/**
|
1941
|
+
* Create Features constant.
|
1942
|
+
*
|
1943
|
+
* No Ruby usage (internal function)
|
1944
|
+
*/
|
1945
|
+
static void
|
1946
|
+
features_constant(void)
|
1947
|
+
{
|
1948
|
+
VALUE features;
|
1949
|
+
|
1950
|
+
// 6.5.7 - latest (7.0.0)
|
1951
|
+
features = rb_str_new2(GetMagickFeatures());
|
1952
|
+
|
1953
|
+
rb_obj_freeze(features);
|
1954
|
+
rb_define_const(Module_Magick, "Magick_features", features);
|
1955
|
+
|
1956
|
+
RB_GC_GUARD(features);
|
1957
|
+
}
|