rmagick 2.12.2 → 2.13.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +12 -0
- data/Doxyfile +1514 -0
- data/README.html +2 -171
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +2 -2
- data/doc/draw.html +2 -2
- data/doc/ilist.html +2 -2
- data/doc/image1.html +2 -2
- data/doc/image2.html +2 -2
- data/doc/image3.html +2 -2
- data/doc/imageattrs.html +2 -2
- data/doc/imusage.html +2 -2
- data/doc/index.html +3 -3
- data/doc/info.html +2 -2
- data/doc/magick.html +2 -2
- data/doc/optequiv.html +2 -2
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +2 -2
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +12 -8
- data/doc/usage.html +2 -2
- data/ext/RMagick/MANIFEST +311 -309
- data/ext/RMagick/extconf.rb +27 -3
- data/ext/RMagick/rmagick.c +151 -69
- data/ext/RMagick/rmagick.h +218 -158
- data/ext/RMagick/rmdraw.c +616 -261
- data/ext/RMagick/rmenum.c +373 -179
- data/ext/RMagick/rmfill.c +166 -71
- data/ext/RMagick/rmilist.c +323 -146
- data/ext/RMagick/rmimage.c +4994 -1756
- data/ext/RMagick/rminfo.c +1004 -366
- data/ext/RMagick/rmmain.c +62 -27
- data/ext/RMagick/rmmontage.c +222 -97
- data/ext/RMagick/rmpixel.c +454 -155
- data/ext/RMagick/rmstruct.c +305 -153
- data/ext/RMagick/rmutil.c +531 -263
- data/lib/rvg/misc.rb +1 -1
- data/rmagick.gemspec +3 -3
- metadata +313 -310
data/ext/RMagick/rmfill.c
CHANGED
@@ -1,39 +1,54 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
/**************************************************************************//**
|
2
|
+
* GradientFill, TextureFill class definitions for RMagick.
|
3
|
+
*
|
4
|
+
* Copyright © 2002 - 2009 by Timothy P. Hunter
|
5
|
+
*
|
6
|
+
* Changes since Nov. 2009 copyright © by Benjamin Thomas and Omer Bar-or
|
7
|
+
*
|
8
|
+
* @file rmfill.c
|
9
|
+
* @version $Id: rmfill.c,v 1.33 2009/12/20 02:33:33 baror Exp $
|
10
|
+
* @author Tim Hunter
|
11
|
+
******************************************************************************/
|
8
12
|
|
9
13
|
#include "rmagick.h"
|
10
14
|
|
15
|
+
/** Data associated with a GradientFill */
|
11
16
|
typedef struct
|
12
17
|
{
|
13
|
-
double x1
|
14
|
-
|
15
|
-
|
18
|
+
double x1; /**< x position of first point */
|
19
|
+
double y1; /**< y position of first point */
|
20
|
+
double x2; /**< x position of second point */
|
21
|
+
double y2; /**< y position of second point */
|
22
|
+
PixelPacket start_color; /**< the start color */
|
23
|
+
PixelPacket stop_color; /**< the stop color */
|
16
24
|
} rm_GradientFill;
|
17
25
|
|
26
|
+
/** Data associated with a TextureFill */
|
18
27
|
typedef struct
|
19
28
|
{
|
20
|
-
Image *texture;
|
29
|
+
Image *texture; /**< the texture */
|
21
30
|
} rm_TextureFill;
|
22
31
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
32
|
+
/**
|
33
|
+
* Free Fill or Fill subclass object (except for TextureFill).
|
34
|
+
*
|
35
|
+
* No Ruby usage (internal function)
|
36
|
+
*
|
37
|
+
* @param fill the fill
|
38
|
+
*/
|
28
39
|
static void free_Fill(void *fill)
|
29
40
|
{
|
30
41
|
xfree(fill);
|
31
42
|
}
|
32
43
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
44
|
+
/**
|
45
|
+
* Create new GradientFill object.
|
46
|
+
*
|
47
|
+
* No Ruby usage (internal function)
|
48
|
+
*
|
49
|
+
* @param class the Ruby class to use
|
50
|
+
* @return a new GradientFill object
|
51
|
+
*/
|
37
52
|
VALUE
|
38
53
|
GradientFill_alloc(VALUE class)
|
39
54
|
{
|
@@ -43,10 +58,21 @@ GradientFill_alloc(VALUE class)
|
|
43
58
|
}
|
44
59
|
|
45
60
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
61
|
+
/**
|
62
|
+
* Store the vector points and the start and stop colors.
|
63
|
+
*
|
64
|
+
* Ruby usage:
|
65
|
+
* - @verbatim GradientFill#initialize(x1,y1,x2,y2,start_color,stop_color) @endverbatim
|
66
|
+
*
|
67
|
+
* @param self this object
|
68
|
+
* @param x1 x position of first point
|
69
|
+
* @param y1 y position of first point
|
70
|
+
* @param x2 x position of second point
|
71
|
+
* @param y2 y position of second point
|
72
|
+
* @param start_color the start color
|
73
|
+
* @param stop_color the stop color
|
74
|
+
* @return self
|
75
|
+
*/
|
50
76
|
VALUE
|
51
77
|
GradientFill_initialize(
|
52
78
|
VALUE self,
|
@@ -71,10 +97,17 @@ GradientFill_initialize(
|
|
71
97
|
return self;
|
72
98
|
}
|
73
99
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
100
|
+
/**
|
101
|
+
* Do a gradient that radiates from a point.
|
102
|
+
*
|
103
|
+
* No Ruby usage (internal function)
|
104
|
+
*
|
105
|
+
* @param image the image on which to do the gradient
|
106
|
+
* @param x0 x position of the point
|
107
|
+
* @param y0 y position of the point
|
108
|
+
* @param start_color the start color
|
109
|
+
* @param stop_color the stop color
|
110
|
+
*/
|
78
111
|
static void
|
79
112
|
point_fill(
|
80
113
|
Image *image,
|
@@ -133,11 +166,17 @@ point_fill(
|
|
133
166
|
#endif
|
134
167
|
}
|
135
168
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
169
|
+
/**
|
170
|
+
* Do a gradient fill that proceeds from a vertical line to the right and left
|
171
|
+
* sides of the image.
|
172
|
+
*
|
173
|
+
* No Ruby usage (internal function)
|
174
|
+
*
|
175
|
+
* @param image the image on which to do the gradient
|
176
|
+
* @param x1 x position of the vertical line
|
177
|
+
* @param start_color the start color
|
178
|
+
* @param stop_color the stop color
|
179
|
+
*/
|
141
180
|
static void
|
142
181
|
vertical_fill(
|
143
182
|
Image *image,
|
@@ -213,10 +252,16 @@ vertical_fill(
|
|
213
252
|
xfree((void *)master);
|
214
253
|
}
|
215
254
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
255
|
+
/**
|
256
|
+
* Do a gradient fill that starts from a horizontal line.
|
257
|
+
*
|
258
|
+
* No Ruby usage (internal function)
|
259
|
+
*
|
260
|
+
* @param image the image on which to do the gradient
|
261
|
+
* @param y1 y position of the horizontal line
|
262
|
+
* @param start_color the start color
|
263
|
+
* @param stop_color the stop color
|
264
|
+
*/
|
220
265
|
static void
|
221
266
|
horizontal_fill(
|
222
267
|
Image *image,
|
@@ -288,11 +333,20 @@ horizontal_fill(
|
|
288
333
|
xfree((PixelPacket *)master);
|
289
334
|
}
|
290
335
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
336
|
+
/**
|
337
|
+
* Do a gradient fill that starts from a diagonal line and ends at the top and
|
338
|
+
* bottom of the image.
|
339
|
+
*
|
340
|
+
* No Ruby usage (internal function)
|
341
|
+
*
|
342
|
+
* @param image the image on which to do the gradient
|
343
|
+
* @param x1 x position of the start of the diagonal line
|
344
|
+
* @param y1 y position of the start of the diagonal line
|
345
|
+
* @param x2 x position of the end of the diagonal line
|
346
|
+
* @param y2 y position of the end of the diagonal line
|
347
|
+
* @param start_color the start color
|
348
|
+
* @param stop_color the stop color
|
349
|
+
*/
|
296
350
|
static void
|
297
351
|
v_diagonal_fill(
|
298
352
|
Image *image,
|
@@ -384,11 +438,20 @@ v_diagonal_fill(
|
|
384
438
|
|
385
439
|
}
|
386
440
|
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
441
|
+
/**
|
442
|
+
* Do a gradient fill that starts from a diagonal line and ends at the sides of
|
443
|
+
* the image.
|
444
|
+
*
|
445
|
+
* No Ruby usage (internal function)
|
446
|
+
*
|
447
|
+
* @param image the image on which to do the gradient
|
448
|
+
* @param x1 x position of the start of the diagonal line
|
449
|
+
* @param y1 y position of the start of the diagonal line
|
450
|
+
* @param x2 x position of the end of the diagonal line
|
451
|
+
* @param y2 y position of the end of the diagonal line
|
452
|
+
* @param start_color the start color
|
453
|
+
* @param stop_color the stop color
|
454
|
+
*/
|
392
455
|
static void
|
393
456
|
h_diagonal_fill(
|
394
457
|
Image *image,
|
@@ -481,12 +544,17 @@ h_diagonal_fill(
|
|
481
544
|
#endif
|
482
545
|
}
|
483
546
|
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
547
|
+
/**
|
548
|
+
* Call GradientFill with the start and stop colors specified when this fill
|
549
|
+
* object was created.
|
550
|
+
*
|
551
|
+
* Ruby usage:
|
552
|
+
* - @verbatim GradientFill#fill(image) @endverbatim
|
553
|
+
*
|
554
|
+
* @param self this object
|
555
|
+
* @param image_obj the image
|
556
|
+
* @return self
|
557
|
+
*/
|
490
558
|
VALUE
|
491
559
|
GradientFill_fill(VALUE self, VALUE image_obj)
|
492
560
|
{
|
@@ -547,11 +615,16 @@ GradientFill_fill(VALUE self, VALUE image_obj)
|
|
547
615
|
}
|
548
616
|
|
549
617
|
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
618
|
+
/**
|
619
|
+
* Free the TextureFill struct and the texture image it points to.
|
620
|
+
*
|
621
|
+
* No Ruby usage (internal function)
|
622
|
+
*
|
623
|
+
* Notes:
|
624
|
+
* - Called from GC
|
625
|
+
*
|
626
|
+
* @param fill_obj the TextureFill
|
627
|
+
*/
|
555
628
|
static void
|
556
629
|
free_TextureFill(void *fill_obj)
|
557
630
|
{
|
@@ -562,11 +635,17 @@ free_TextureFill(void *fill_obj)
|
|
562
635
|
xfree(fill);
|
563
636
|
}
|
564
637
|
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
638
|
+
/**
|
639
|
+
* Create new TextureFill object.
|
640
|
+
*
|
641
|
+
* No Ruby usage (internal function)
|
642
|
+
*
|
643
|
+
* Notes:
|
644
|
+
* - The texture is an Image or Image *object
|
645
|
+
*
|
646
|
+
* @param class the Ruby class to use
|
647
|
+
* @return a new TextureFill object
|
648
|
+
*/
|
570
649
|
VALUE
|
571
650
|
TextureFill_alloc(VALUE class)
|
572
651
|
{
|
@@ -578,10 +657,19 @@ TextureFill_alloc(VALUE class)
|
|
578
657
|
, fill);
|
579
658
|
}
|
580
659
|
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
660
|
+
/**
|
661
|
+
* Store the texture image.
|
662
|
+
*
|
663
|
+
* Ruby usage:
|
664
|
+
* - @verbatim TextureFill#initialize(texture) @endverbatim
|
665
|
+
*
|
666
|
+
* Notes:
|
667
|
+
* - The texture is an Image or Image *object
|
668
|
+
*
|
669
|
+
* @param self this object
|
670
|
+
* @param texture_arg the texture
|
671
|
+
* @return self
|
672
|
+
*/
|
585
673
|
VALUE
|
586
674
|
TextureFill_initialize(VALUE self, VALUE texture_arg)
|
587
675
|
{
|
@@ -601,10 +689,17 @@ TextureFill_initialize(VALUE self, VALUE texture_arg)
|
|
601
689
|
return self;
|
602
690
|
}
|
603
691
|
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
692
|
+
/**
|
693
|
+
* Call TextureFill with the texture specified when this fill object was
|
694
|
+
* created.
|
695
|
+
*
|
696
|
+
* Ruby usage:
|
697
|
+
* - @verbatim TextureFill#fill(image) @endverbatim
|
698
|
+
*
|
699
|
+
* @param self this object
|
700
|
+
* @param image_obj the image
|
701
|
+
* @return self
|
702
|
+
*/
|
608
703
|
VALUE
|
609
704
|
TextureFill_fill(VALUE self, VALUE image_obj)
|
610
705
|
{
|
data/ext/RMagick/rmilist.c
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
/**************************************************************************//**
|
2
|
+
* ImageList class method definitions for RMagick.
|
3
|
+
*
|
4
|
+
* Copyright © 2002 - 2009 by Timothy P. Hunter
|
5
|
+
*
|
6
|
+
* Changes since Nov. 2009 copyright © by Benjamin Thomas and Omer Bar-or
|
7
|
+
*
|
8
|
+
* @file rmilist.c
|
9
|
+
* @version $Id: rmilist.c,v 1.94 2009/12/20 02:33:33 baror Exp $
|
10
|
+
* @author Tim Hunter
|
11
|
+
******************************************************************************/
|
8
12
|
|
9
13
|
#include "rmagick.h"
|
10
14
|
|
@@ -20,12 +24,20 @@ static VALUE ImageList_new(void);
|
|
20
24
|
|
21
25
|
|
22
26
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
/**
|
28
|
+
* Repeatedly display the images in the images array to an XWindow screen. The
|
29
|
+
* "delay" argument is the number of 1/100ths of a second (0 to 65535) to delay
|
30
|
+
* between images.
|
31
|
+
*
|
32
|
+
* Ruby usage:
|
33
|
+
* - @verbatim ImageList#animate @endverbatim
|
34
|
+
* - @verbatim ImageList#animate(delay) @endverbatim
|
35
|
+
*
|
36
|
+
* @param argc number of input arguments
|
37
|
+
* @param argv array of input arguments
|
38
|
+
* @param self this object
|
39
|
+
* @return self
|
40
|
+
*/
|
29
41
|
|
30
42
|
VALUE
|
31
43
|
ImageList_animate(int argc, VALUE *argv, VALUE self)
|
@@ -66,11 +78,16 @@ ImageList_animate(int argc, VALUE *argv, VALUE self)
|
|
66
78
|
}
|
67
79
|
|
68
80
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
81
|
+
/**
|
82
|
+
* Append all the images by calling ImageAppend.
|
83
|
+
*
|
84
|
+
* Ruby usage:
|
85
|
+
* - @verbatim ImageList#append(stack) @endverbatim
|
86
|
+
*
|
87
|
+
* @param self this object
|
88
|
+
* @param stack_arg the stack of images
|
89
|
+
* @return a Frame object for the result
|
90
|
+
*/
|
74
91
|
VALUE
|
75
92
|
ImageList_append(VALUE self, VALUE stack_arg)
|
76
93
|
{
|
@@ -97,11 +114,15 @@ ImageList_append(VALUE self, VALUE stack_arg)
|
|
97
114
|
}
|
98
115
|
|
99
116
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
117
|
+
/**
|
118
|
+
* Average all images together by calling AverageImages.
|
119
|
+
*
|
120
|
+
* Ruby usage:
|
121
|
+
* - @verbatim ImageList#average @endverbatim
|
122
|
+
*
|
123
|
+
* @param self this object
|
124
|
+
* @return a Frame object for the averaged image
|
125
|
+
*/
|
105
126
|
VALUE
|
106
127
|
ImageList_average(VALUE self)
|
107
128
|
{
|
@@ -123,14 +144,19 @@ ImageList_average(VALUE self)
|
|
123
144
|
}
|
124
145
|
|
125
146
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
147
|
+
/**
|
148
|
+
* Call CoalesceImages.
|
149
|
+
*
|
150
|
+
* Ruby usage:
|
151
|
+
* - @verbatim ImageList#coalesce @endverbatim
|
152
|
+
*
|
153
|
+
* Notes:
|
154
|
+
* - Respects the delay, matte, and start_loop fields in each image.
|
155
|
+
*
|
156
|
+
* @param self this object
|
157
|
+
* @return a new Image with the coalesced image sequence return stored in the
|
158
|
+
* images array
|
159
|
+
*/
|
134
160
|
VALUE
|
135
161
|
ImageList_coalesce(VALUE self)
|
136
162
|
{
|
@@ -152,11 +178,22 @@ ImageList_coalesce(VALUE self)
|
|
152
178
|
}
|
153
179
|
|
154
180
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
181
|
+
/**
|
182
|
+
* Equivalent to convert's -layers composite option.
|
183
|
+
*
|
184
|
+
* Ruby usage:
|
185
|
+
* - @verbatim ImageList#composite_layers(images) @endverbatim
|
186
|
+
* - @verbatim ImageList#composite_layers(images,operator) @endverbatim
|
187
|
+
*
|
188
|
+
* Notes:
|
189
|
+
* - Default operator is OverCompositeOp
|
190
|
+
*
|
191
|
+
* @param argc number of input arguments
|
192
|
+
* @param argv array of input arguments
|
193
|
+
* @param self this object
|
194
|
+
* @return a new imagelist
|
195
|
+
* @see mogrify.c in ImageMagick
|
196
|
+
*/
|
160
197
|
VALUE
|
161
198
|
ImageList_composite_layers(int argc, VALUE *argv, VALUE self)
|
162
199
|
{
|
@@ -204,13 +241,16 @@ ImageList_composite_layers(int argc, VALUE *argv, VALUE self)
|
|
204
241
|
}
|
205
242
|
|
206
243
|
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
244
|
+
/**
|
245
|
+
* Compare each image with the next in a sequence and returns the maximum
|
246
|
+
* bounding region of any pixel differences it discovers.
|
247
|
+
*
|
248
|
+
* Ruby usage:
|
249
|
+
* - @verbatim ImageList#deconstruct @endverbatim
|
250
|
+
*
|
251
|
+
* @param self this object
|
252
|
+
* @return a new imagelist
|
253
|
+
*/
|
214
254
|
VALUE
|
215
255
|
ImageList_deconstruct(VALUE self)
|
216
256
|
{
|
@@ -230,10 +270,15 @@ ImageList_deconstruct(VALUE self)
|
|
230
270
|
}
|
231
271
|
|
232
272
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
273
|
+
/**
|
274
|
+
* Display all the images to an X window screen.
|
275
|
+
*
|
276
|
+
* Ruby usage:
|
277
|
+
* - @verbatim ImageList#display @endverbatim
|
278
|
+
*
|
279
|
+
* @param self this object
|
280
|
+
* @return self
|
281
|
+
*/
|
237
282
|
VALUE
|
238
283
|
ImageList_display(VALUE self)
|
239
284
|
{
|
@@ -256,12 +301,18 @@ ImageList_display(VALUE self)
|
|
256
301
|
}
|
257
302
|
|
258
303
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
304
|
+
/**
|
305
|
+
* Merge all the images into a single image.
|
306
|
+
*
|
307
|
+
* Ruby usage:
|
308
|
+
* - @verbatim ImageList#flatten_images @endverbatim
|
309
|
+
*
|
310
|
+
* Notes:
|
311
|
+
* - Can't use "flatten" because that's an Array method
|
312
|
+
*
|
313
|
+
* @param self this object
|
314
|
+
* @return the new image
|
315
|
+
*/
|
265
316
|
VALUE
|
266
317
|
ImageList_flatten_images(VALUE self)
|
267
318
|
{
|
@@ -287,9 +338,22 @@ ImageList_flatten_images(VALUE self)
|
|
287
338
|
}
|
288
339
|
|
289
340
|
|
290
|
-
|
291
|
-
|
292
|
-
|
341
|
+
/**
|
342
|
+
* Apply fx on the images.
|
343
|
+
*
|
344
|
+
* Ruby usage:
|
345
|
+
* - @verbatim ImageList#fx(expression) @endverbatim
|
346
|
+
* - @verbatim ImageList#fx(expression, channel) @endverbatim
|
347
|
+
* - @verbatim ImageList#fx(expression, channel, ...) @endverbatim
|
348
|
+
*
|
349
|
+
* Notes:
|
350
|
+
* - Default channel is AllChannels
|
351
|
+
*
|
352
|
+
* @param argc number of input arguments
|
353
|
+
* @param argv array of input arguments
|
354
|
+
* @param self this object
|
355
|
+
* @return a new image
|
356
|
+
*/
|
293
357
|
VALUE
|
294
358
|
ImageList_fx(int argc, VALUE *argv, VALUE self)
|
295
359
|
{
|
@@ -326,11 +390,22 @@ ImageList_fx(int argc, VALUE *argv, VALUE self)
|
|
326
390
|
}
|
327
391
|
|
328
392
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
393
|
+
/**
|
394
|
+
* Call MapImages.
|
395
|
+
*
|
396
|
+
* Ruby usage:
|
397
|
+
* - @verbatim ImageList#map(reference) @endverbatim
|
398
|
+
* - @verbatim ImageList#map(reference, dither) @endverbatim
|
399
|
+
*
|
400
|
+
* Notes:
|
401
|
+
* - Default dither is false
|
402
|
+
* - Sets \@scene to self.scene
|
403
|
+
*
|
404
|
+
* @param argc number of input arguments
|
405
|
+
* @param argv array of input arguments
|
406
|
+
* @param self this object
|
407
|
+
* @return a new ImageList with mapped images.
|
408
|
+
*/
|
334
409
|
VALUE
|
335
410
|
ImageList_map(int argc, VALUE *argv, VALUE self)
|
336
411
|
{
|
@@ -382,12 +457,19 @@ ImageList_map(int argc, VALUE *argv, VALUE self)
|
|
382
457
|
}
|
383
458
|
|
384
459
|
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
460
|
+
/**
|
461
|
+
* Call MontageImages.
|
462
|
+
*
|
463
|
+
* Ruby usage:
|
464
|
+
* - @verbatim ImageList#montage <{parm block}> @endverbatim
|
465
|
+
*
|
466
|
+
* Notes:
|
467
|
+
* - Creates Montage object, yields to block if present in Montage object's
|
468
|
+
* scope.
|
469
|
+
*
|
470
|
+
* @param self this object
|
471
|
+
* @return a new image list
|
472
|
+
*/
|
391
473
|
VALUE
|
392
474
|
ImageList_montage(VALUE self)
|
393
475
|
{
|
@@ -433,14 +515,20 @@ ImageList_montage(VALUE self)
|
|
433
515
|
}
|
434
516
|
|
435
517
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
518
|
+
/**
|
519
|
+
* Requires a minimum of two images. The first image is transformed into the
|
520
|
+
* second by a number of intervening images as specified by "number_images".
|
521
|
+
*
|
522
|
+
* Ruby usage:
|
523
|
+
* - @verbatim ImageList#morph(number_images) @endverbatim
|
524
|
+
*
|
525
|
+
* Notes:
|
526
|
+
* - Sets \@scenes to 0
|
527
|
+
*
|
528
|
+
* @param self this object
|
529
|
+
* @param nimages the number of images
|
530
|
+
* @return a new image list with the images array set to the morph sequence.
|
531
|
+
*/
|
444
532
|
VALUE
|
445
533
|
ImageList_morph(VALUE self, VALUE nimages)
|
446
534
|
{
|
@@ -469,11 +557,15 @@ ImageList_morph(VALUE self, VALUE nimages)
|
|
469
557
|
}
|
470
558
|
|
471
559
|
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
560
|
+
/**
|
561
|
+
* Merge all the images into a single image.
|
562
|
+
*
|
563
|
+
* Ruby usage:
|
564
|
+
* - @verbatim ImageList#mosaic @endverbatim
|
565
|
+
*
|
566
|
+
* @param self this object
|
567
|
+
* @return the new image
|
568
|
+
*/
|
477
569
|
VALUE
|
478
570
|
ImageList_mosaic(VALUE self)
|
479
571
|
{
|
@@ -499,11 +591,16 @@ ImageList_mosaic(VALUE self)
|
|
499
591
|
}
|
500
592
|
|
501
593
|
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
594
|
+
/**
|
595
|
+
* Equivalent to -layers option in ImageMagick 6.2.6.
|
596
|
+
*
|
597
|
+
* Ruby usage:
|
598
|
+
* - @verbatim ImageList#optimize_layers(method) @endverbatim
|
599
|
+
*
|
600
|
+
* @param self this object
|
601
|
+
* @param method the method to use
|
602
|
+
* @return a new imagelist
|
603
|
+
*/
|
507
604
|
VALUE
|
508
605
|
ImageList_optimize_layers(VALUE self, VALUE method)
|
509
606
|
{
|
@@ -613,11 +710,16 @@ ImageList_optimize_layers(VALUE self, VALUE method)
|
|
613
710
|
}
|
614
711
|
|
615
712
|
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
713
|
+
/**
|
714
|
+
* Create a new ImageList object with no images.
|
715
|
+
*
|
716
|
+
* No Ruby usage (internal function)
|
717
|
+
*
|
718
|
+
* Notes:
|
719
|
+
* - this simply calls ImageList.new() in RMagick.rb
|
720
|
+
*
|
721
|
+
* @return a new imagelist
|
722
|
+
*/
|
621
723
|
static VALUE
|
622
724
|
ImageList_new(void)
|
623
725
|
{
|
@@ -625,11 +727,18 @@ ImageList_new(void)
|
|
625
727
|
}
|
626
728
|
|
627
729
|
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
730
|
+
/**
|
731
|
+
* Construct a new imagelist object from a list of images.
|
732
|
+
*
|
733
|
+
* No Ruby usage (internal function)
|
734
|
+
*
|
735
|
+
* Notes:
|
736
|
+
* - Sets \@scene to 0.
|
737
|
+
*
|
738
|
+
* @param images the images
|
739
|
+
* @return a new imagelist
|
740
|
+
* @see images_from_imagelist
|
741
|
+
*/
|
633
742
|
VALUE
|
634
743
|
rm_imagelist_from_images(Image *images)
|
635
744
|
{
|
@@ -654,12 +763,16 @@ rm_imagelist_from_images(Image *images)
|
|
654
763
|
}
|
655
764
|
|
656
765
|
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
766
|
+
/**
|
767
|
+
* Convert an array of Image *s to an ImageMagick scene sequence (i.e. a
|
768
|
+
* doubly-linked list of Images).
|
769
|
+
*
|
770
|
+
* No Ruby usage (internal function)
|
771
|
+
*
|
772
|
+
* @param imagelist the imagelist
|
773
|
+
* @return a pointer to the head of the scene sequence list
|
774
|
+
* @see rm_imagelist_from_images
|
775
|
+
*/
|
663
776
|
static Image *
|
664
777
|
images_from_imagelist(VALUE imagelist)
|
665
778
|
{
|
@@ -683,10 +796,15 @@ images_from_imagelist(VALUE imagelist)
|
|
683
796
|
}
|
684
797
|
|
685
798
|
|
686
|
-
|
687
|
-
*
|
688
|
-
*
|
689
|
-
|
799
|
+
/**
|
800
|
+
* \@scene attribute writer.
|
801
|
+
*
|
802
|
+
* No Ruby usage (internal function)
|
803
|
+
*
|
804
|
+
* @param imagelist the imagelist
|
805
|
+
* @param scene the scene
|
806
|
+
* @return the scene
|
807
|
+
*/
|
690
808
|
static VALUE
|
691
809
|
imagelist_scene_eq(VALUE imagelist, VALUE scene)
|
692
810
|
{
|
@@ -696,10 +814,14 @@ imagelist_scene_eq(VALUE imagelist, VALUE scene)
|
|
696
814
|
}
|
697
815
|
|
698
816
|
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
817
|
+
/**
|
818
|
+
* return the # of images in an imagelist.
|
819
|
+
*
|
820
|
+
* No Ruby usage (internal function)
|
821
|
+
*
|
822
|
+
* @param imagelist the imagelist
|
823
|
+
* @return the number of images
|
824
|
+
*/
|
703
825
|
static long
|
704
826
|
imagelist_length(VALUE imagelist)
|
705
827
|
{
|
@@ -708,10 +830,15 @@ imagelist_length(VALUE imagelist)
|
|
708
830
|
}
|
709
831
|
|
710
832
|
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
833
|
+
/**
|
834
|
+
* Raise exception if imagelist is emtpy.
|
835
|
+
*
|
836
|
+
* No Ruby usage (internal function)
|
837
|
+
*
|
838
|
+
* @param imagelist the imagelist
|
839
|
+
* @return the number of images
|
840
|
+
* @throw ArgError
|
841
|
+
*/
|
715
842
|
static long
|
716
843
|
check_imagelist_length(VALUE imagelist)
|
717
844
|
{
|
@@ -726,10 +853,14 @@ check_imagelist_length(VALUE imagelist)
|
|
726
853
|
}
|
727
854
|
|
728
855
|
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
856
|
+
/**
|
857
|
+
* Push an image onto the end of the imagelist.
|
858
|
+
*
|
859
|
+
* No Ruby usage (internal function)
|
860
|
+
*
|
861
|
+
* @param imagelist the imagelist
|
862
|
+
* @param image the image
|
863
|
+
*/
|
733
864
|
static void
|
734
865
|
imagelist_push(VALUE imagelist, VALUE image)
|
735
866
|
{
|
@@ -738,9 +869,13 @@ imagelist_push(VALUE imagelist, VALUE image)
|
|
738
869
|
}
|
739
870
|
|
740
871
|
|
741
|
-
|
742
|
-
*
|
743
|
-
*
|
872
|
+
/**
|
873
|
+
* Clone a list of images, handle errors.
|
874
|
+
*
|
875
|
+
* No Ruby usage (internal function)
|
876
|
+
*
|
877
|
+
* @param images the images
|
878
|
+
* @return a new array of images
|
744
879
|
*/
|
745
880
|
static Image *
|
746
881
|
clone_imagelist(Image *images)
|
@@ -764,13 +899,30 @@ clone_imagelist(Image *images)
|
|
764
899
|
}
|
765
900
|
|
766
901
|
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
902
|
+
/**
|
903
|
+
* Call QuantizeImages.
|
904
|
+
*
|
905
|
+
* Ruby usage:
|
906
|
+
* - @verbatim ImageList#quantize @endverbatim
|
907
|
+
* - @verbatim ImageList#quantize(number_colors) @endverbatim
|
908
|
+
* - @verbatim ImageList#quantize(number_colors, colorspace) @endverbatim
|
909
|
+
* - @verbatim ImageList#quantize(number_colors, colorspace, dither) @endverbatim
|
910
|
+
* - @verbatim ImageList#quantize(number_colors, colorspace, dither, tree_depth) @endverbatim
|
911
|
+
* - @verbatim ImageList#quantize(number_colors, colorspace, dither, tree_depth, measure_error) @endverbatim
|
912
|
+
*
|
913
|
+
* Notes:
|
914
|
+
* - Default number_colors is 256
|
915
|
+
* - Default coorspace is Magick::RGBColorsapce
|
916
|
+
* - Default dither is true
|
917
|
+
* - Default tree_depth is 0
|
918
|
+
* - Default measure_error is false
|
919
|
+
* - Sets \@scene to the same value as self.scene
|
920
|
+
*
|
921
|
+
* @param argc number of input arguments
|
922
|
+
* @param argv array of input arguments
|
923
|
+
* @param self this object
|
924
|
+
* @return a new ImageList with quantized images
|
925
|
+
*/
|
774
926
|
VALUE
|
775
927
|
ImageList_quantize(int argc, VALUE *argv, VALUE self)
|
776
928
|
{
|
@@ -840,11 +992,24 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
|
|
840
992
|
}
|
841
993
|
|
842
994
|
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
995
|
+
/**
|
996
|
+
* Call RemapImages.
|
997
|
+
*
|
998
|
+
* Ruby usage:
|
999
|
+
* - @verbatim ImageList#remap @endverbatim
|
1000
|
+
* - @verbatim ImageList#remap(remap_image) @endverbatim
|
1001
|
+
* - @verbatim ImageList#remap(remap_image, dither_method) @endverbatim
|
1002
|
+
*
|
1003
|
+
* Notes:
|
1004
|
+
* - Default remap_image is nil
|
1005
|
+
* - Default dither_method is RiemersmaDitherMethod
|
1006
|
+
* - Modifies images in-place.
|
1007
|
+
*
|
1008
|
+
* @param argc number of input arguments
|
1009
|
+
* @param argv array of input arguments
|
1010
|
+
* @param self this object
|
1011
|
+
* @see Image_remap
|
1012
|
+
*/
|
848
1013
|
VALUE
|
849
1014
|
ImageList_remap(int argc, VALUE *argv, VALUE self)
|
850
1015
|
{
|
@@ -892,12 +1057,19 @@ ImageList_remap(int argc, VALUE *argv, VALUE self)
|
|
892
1057
|
}
|
893
1058
|
|
894
1059
|
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
1060
|
+
/**
|
1061
|
+
* Return the imagelist as a blob (a String).
|
1062
|
+
*
|
1063
|
+
* Ruby usage:
|
1064
|
+
* - @verbatim ImageList#to_blob @endverbatim
|
1065
|
+
*
|
1066
|
+
* Notes:
|
1067
|
+
* - Runs an info parm block if present - the user can specify the image
|
1068
|
+
* format and depth
|
1069
|
+
*
|
1070
|
+
* @param self this object
|
1071
|
+
* @return the blob
|
1072
|
+
*/
|
901
1073
|
VALUE
|
902
1074
|
ImageList_to_blob(VALUE self)
|
903
1075
|
{
|
@@ -961,14 +1133,19 @@ ImageList_to_blob(VALUE self)
|
|
961
1133
|
}
|
962
1134
|
|
963
1135
|
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
1136
|
+
/**
|
1137
|
+
* Write all the images to the specified file. If the file format supports
|
1138
|
+
* multi-image files, and the 'images' array contains more than one image, then
|
1139
|
+
* the images will be written as a single multi-image file. Otherwise each image
|
1140
|
+
* will be written to a separate file.
|
1141
|
+
*
|
1142
|
+
* Ruby usage:
|
1143
|
+
* - @verbatim ImageList#write(file) @endverbatim
|
1144
|
+
*
|
1145
|
+
* @param self this object
|
1146
|
+
* @param file the file
|
1147
|
+
* @return self
|
1148
|
+
*/
|
972
1149
|
VALUE
|
973
1150
|
ImageList_write(VALUE self, VALUE file)
|
974
1151
|
{
|