rmagick 1.7.4 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +10 -2
- data/README.html +284 -290
- data/README.txt +298 -307
- data/configure +180 -11
- data/configure.ac +18 -2
- data/doc/comtasks.html +1 -1
- data/doc/constants.html +15 -10
- data/doc/css/ref.css +67 -0
- data/doc/draw.html +1 -1
- data/doc/ex/InitialCoords.rb +24 -0
- data/doc/ex/NewCoordSys.rb +33 -0
- data/doc/ex/OrigCoordSys.rb +19 -0
- data/doc/ex/PreserveAspectRatio.rb +206 -0
- data/doc/ex/RotateScale.rb +38 -0
- data/doc/ex/Skew.rb +39 -0
- data/doc/ex/Use01.rb +17 -0
- data/doc/ex/Use02.rb +22 -0
- data/doc/ex/Use03.rb +17 -0
- data/doc/ex/ViewBox.rb +34 -0
- data/doc/ex/arcs01.rb +29 -0
- data/doc/ex/arcs02.rb +62 -0
- data/doc/ex/baseline_shift01.rb +19 -0
- data/doc/ex/bounding_box.rb +31 -37
- data/doc/ex/circle01.rb +18 -0
- data/doc/ex/cubic01.rb +46 -0
- data/doc/ex/cubic02.rb +95 -0
- data/doc/ex/drop_shadow.rb +1 -1
- data/doc/ex/ellipse01.rb +23 -0
- data/doc/ex/evenodd.rb +44 -0
- data/doc/ex/font_styles.rb +29 -0
- data/doc/ex/group.rb +27 -0
- data/doc/ex/image.rb +47 -0
- data/doc/ex/images/big-duck.gif +0 -0
- data/doc/ex/images/duck.gif +0 -0
- data/doc/ex/images/duck0.gif +0 -0
- data/doc/ex/images/duck1.gif +0 -0
- data/doc/ex/images/duck10.gif +0 -0
- data/doc/ex/images/duck11.gif +0 -0
- data/doc/ex/images/duck12.gif +0 -0
- data/doc/ex/images/duck13.gif +0 -0
- data/doc/ex/images/duck14.gif +0 -0
- data/doc/ex/images/duck15.gif +0 -0
- data/doc/ex/images/duck2.gif +0 -0
- data/doc/ex/images/duck3.gif +0 -0
- data/doc/ex/images/duck4.gif +0 -0
- data/doc/ex/images/duck5.gif +0 -0
- data/doc/ex/images/duck6.gif +0 -0
- data/doc/ex/images/duck7.gif +0 -0
- data/doc/ex/images/duck8.gif +0 -0
- data/doc/ex/images/duck9.gif +0 -0
- data/doc/ex/line01.rb +24 -0
- data/doc/ex/nested_rvg.rb +22 -0
- data/doc/ex/nonzero.rb +44 -0
- data/doc/ex/polygon01.rb +24 -0
- data/doc/ex/polyline01.rb +24 -0
- data/doc/ex/quad01.rb +37 -0
- data/doc/ex/rect01.rb +16 -0
- data/doc/ex/rect02.rb +23 -0
- data/doc/ex/rvg_clippath.rb +15 -0
- data/doc/ex/rvg_linecap.rb +44 -0
- data/doc/ex/rvg_linejoin.rb +42 -0
- data/doc/ex/rvg_opacity.rb +20 -0
- data/doc/ex/rvg_pattern.rb +27 -0
- data/doc/ex/rvg_stroke_dasharray.rb +13 -0
- data/doc/ex/sepiatone.rb +15 -0
- data/doc/ex/shadow.rb +37 -0
- data/doc/ex/smile.rb +9 -9
- data/doc/ex/stroke_fill.rb +12 -0
- data/doc/ex/text01.rb +18 -0
- data/doc/ex/text_styles.rb +22 -0
- data/doc/ex/texture_fill_to_border.rb +3 -3
- data/doc/ex/texture_floodfill.rb +3 -2
- data/doc/ex/tref01.rb +26 -0
- data/doc/ex/triangle01.rb +17 -0
- data/doc/ex/tspan01.rb +19 -0
- data/doc/ex/tspan02.rb +20 -0
- data/doc/ex/tspan03.rb +22 -0
- data/doc/ex/writing_mode01.rb +28 -0
- data/doc/ex/writing_mode02.rb +27 -0
- data/doc/ilist.html +1 -1
- data/doc/image1.html +66 -30
- data/doc/image2.html +1 -1
- data/doc/image3.html +274 -49
- data/doc/imageattrs.html +87 -10
- data/doc/imusage.html +1 -1
- data/doc/index.html +80 -39
- data/doc/info.html +149 -13
- data/doc/magick.html +1 -1
- data/doc/rvg.html +890 -0
- data/doc/rvgclip.html +249 -0
- data/doc/rvggroup.html +305 -0
- data/doc/rvgimage.html +288 -0
- data/doc/rvgpattern.html +456 -0
- data/doc/rvgshape.html +376 -0
- data/doc/rvgstyle.html +269 -0
- data/doc/rvgtext.html +464 -0
- data/doc/rvgtspan.html +237 -0
- data/doc/rvgtut.html +512 -0
- data/doc/rvguse.html +145 -0
- data/doc/rvgxform.html +294 -0
- data/doc/struct.html +9 -71
- data/doc/usage.html +22 -7
- data/ext/RMagick/MANIFEST +94 -2
- data/ext/RMagick/rmagick.h +10 -4
- data/ext/RMagick/rmagick_config.h.in +8 -2
- data/ext/RMagick/rmdraw.c +2 -2
- data/ext/RMagick/rmfill.c +2 -2
- data/ext/RMagick/rmilist.c +3 -3
- data/ext/RMagick/rmimage.c +152 -5
- data/ext/RMagick/rminfo.c +208 -2
- data/ext/RMagick/rmmain.c +14 -5
- data/ext/RMagick/rmutil.c +83 -22
- data/lib/RMagick.rb +2 -2
- data/lib/rvg/clippath.rb +46 -0
- data/lib/rvg/container.rb +129 -0
- data/lib/rvg/deep_equal.rb +54 -0
- data/lib/rvg/describable.rb +51 -0
- data/lib/rvg/embellishable.rb +395 -0
- data/lib/rvg/misc.rb +729 -0
- data/lib/rvg/paint.rb +48 -0
- data/lib/rvg/pathdata.rb +129 -0
- data/lib/rvg/rvg.rb +279 -0
- data/lib/rvg/stretchable.rb +150 -0
- data/lib/rvg/stylable.rb +116 -0
- data/lib/rvg/text.rb +185 -0
- data/lib/rvg/transformable.rb +131 -0
- data/lib/rvg/units.rb +64 -0
- data/rmagick.gemspec +1 -1
- data/uninstall.rb +3 -2
- metadata +96 -3
data/doc/usage.html
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for Linux/x86 (vers 1st
|
7
|
+
"HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
|
8
8
|
|
9
9
|
<title>RMagick: How to use RMagick</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
13
13
|
<meta name="Copyright" content=
|
14
|
-
"Copyright (C)
|
14
|
+
"Copyright (C) 2005 by Timothy P. Hunter" />
|
15
15
|
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
16
16
|
<script type="text/javascript" src="scripts/doc.js">
|
17
17
|
</script>
|
@@ -135,10 +135,10 @@
|
|
135
135
|
|
136
136
|
</pre>
|
137
137
|
|
138
|
-
<p class="example_cutline">MS Windows users note: The
|
139
|
-
style="font-style:normal">display</span> method does not
|
140
|
-
on native MS Windows. You must use an external viewer to
|
141
|
-
the images you create.</p>
|
138
|
+
<p class="example_cutline">MS Windows users note: The
|
139
|
+
<span style="font-style:normal">display</span> method does not
|
140
|
+
work on native MS Windows. You must use an external viewer to
|
141
|
+
view the images you create.</p>
|
142
142
|
|
143
143
|
<p>Line 1 requires the RMagick.rb file, which defines the
|
144
144
|
<b>Magick</b> module. The Magick module contains 3 major classes,
|
@@ -861,6 +861,12 @@ exit
|
|
861
861
|
"image3.html#unsharp_mask_channel">unsharp_mask_channel</a></dt>
|
862
862
|
|
863
863
|
<dd>Sharpen the image</dd>
|
864
|
+
|
865
|
+
<dt><a href=
|
866
|
+
"image3.html#sigmoidal_contrast_channel">sigmoidal_contrast_channel</a></dt>
|
867
|
+
|
868
|
+
<dd>Adjusts the contrast of an image channel with a
|
869
|
+
non-linear sigmoidal contrast algorithm</dd>
|
864
870
|
</dl>
|
865
871
|
|
866
872
|
<h4>Add effects</h4>
|
@@ -956,11 +962,20 @@ exit
|
|
956
962
|
|
957
963
|
<dd>Add an oil paint effect</dd>
|
958
964
|
|
965
|
+
<dt><a href="image3.html#sepiatone">sepiatone</a></dt>
|
966
|
+
|
967
|
+
<dd>Applies an effect similar to the effect achieved in a
|
968
|
+
photo darkroom by sepia toning.</dd>
|
969
|
+
|
959
970
|
<dt><a href="image3.html#shade">shade</a></dt>
|
960
971
|
|
961
972
|
<dd>Shine a distant light on an image to create a
|
962
973
|
three-dimensional effect</dd>
|
963
974
|
|
975
|
+
<dt><a href="image3.html#shadow">shadow</a></dt>
|
976
|
+
|
977
|
+
<dd>Add a shadow to an image</dd>
|
978
|
+
|
964
979
|
<dt><a href="image3.html#solarize">solarize</a></dt>
|
965
980
|
|
966
981
|
<dd>Apply a special effect to the image, similar to the
|
@@ -1307,7 +1322,7 @@ exit
|
|
1307
1322
|
use radians instead of degrees.</p>
|
1308
1323
|
</div>
|
1309
1324
|
|
1310
|
-
<p class="spacer"
|
1325
|
+
<p class="spacer"> </p>
|
1311
1326
|
|
1312
1327
|
<div class="nav">
|
1313
1328
|
« <a href="index.html">Prev</a> | <a href=
|
data/ext/RMagick/MANIFEST
CHANGED
@@ -1,7 +1,22 @@
|
|
1
|
-
MANIFEST for RMagick-1.
|
1
|
+
MANIFEST for RMagick-1.8.0 - 19:08:36 04/30/05
|
2
2
|
|
3
3
|
configure
|
4
|
+
README.html
|
4
5
|
lib/RMagick.rb
|
6
|
+
lib/rvg/units.rb
|
7
|
+
lib/rvg/transformable.rb
|
8
|
+
lib/rvg/text.rb
|
9
|
+
lib/rvg/stylable.rb
|
10
|
+
lib/rvg/stretchable.rb
|
11
|
+
lib/rvg/rvg.rb
|
12
|
+
lib/rvg/pathdata.rb
|
13
|
+
lib/rvg/paint.rb
|
14
|
+
lib/rvg/misc.rb
|
15
|
+
lib/rvg/embellishable.rb
|
16
|
+
lib/rvg/describable.rb
|
17
|
+
lib/rvg/deep_equal.rb
|
18
|
+
lib/rvg/container.rb
|
19
|
+
lib/rvg/clippath.rb
|
5
20
|
examples/vignette.rb
|
6
21
|
examples/thumbnail.rb
|
7
22
|
examples/rotating_text.rb
|
@@ -19,7 +34,6 @@ metaconfig.in
|
|
19
34
|
install.rb
|
20
35
|
configure.ac
|
21
36
|
README.txt
|
22
|
-
README.html
|
23
37
|
Makefile.in
|
24
38
|
ChangeLog
|
25
39
|
ext/RMagick/rmutil.c
|
@@ -36,6 +50,18 @@ ext/RMagick/MANIFEST
|
|
36
50
|
doc/scripts/doc.js
|
37
51
|
doc/usage.html
|
38
52
|
doc/struct.html
|
53
|
+
doc/rvgxform.html
|
54
|
+
doc/rvguse.html
|
55
|
+
doc/rvgtut.html
|
56
|
+
doc/rvgtspan.html
|
57
|
+
doc/rvgtext.html
|
58
|
+
doc/rvgstyle.html
|
59
|
+
doc/rvgshape.html
|
60
|
+
doc/rvgpattern.html
|
61
|
+
doc/rvgimage.html
|
62
|
+
doc/rvggroup.html
|
63
|
+
doc/rvgclip.html
|
64
|
+
doc/rvg.html
|
39
65
|
doc/magick.html
|
40
66
|
doc/info.html
|
41
67
|
doc/index.html
|
@@ -48,10 +74,17 @@ doc/ilist.html
|
|
48
74
|
doc/draw.html
|
49
75
|
doc/constants.html
|
50
76
|
doc/comtasks.html
|
77
|
+
doc/ex/writing_mode02.rb
|
78
|
+
doc/ex/writing_mode01.rb
|
51
79
|
doc/ex/wave.rb
|
52
80
|
doc/ex/viewex.rb
|
53
81
|
doc/ex/unsharp_mask.rb
|
82
|
+
doc/ex/tspan03.rb
|
83
|
+
doc/ex/tspan02.rb
|
84
|
+
doc/ex/tspan01.rb
|
54
85
|
doc/ex/trim.rb
|
86
|
+
doc/ex/triangle01.rb
|
87
|
+
doc/ex/tref01.rb
|
55
88
|
doc/ex/transparent.rb
|
56
89
|
doc/ex/translate.rb
|
57
90
|
doc/ex/to_blob.rb
|
@@ -60,13 +93,16 @@ doc/ex/texturefill.rb
|
|
60
93
|
doc/ex/texture_floodfill.rb
|
61
94
|
doc/ex/texture_fill_to_border.rb
|
62
95
|
doc/ex/text_undercolor.rb
|
96
|
+
doc/ex/text_styles.rb
|
63
97
|
doc/ex/text_antialias.rb
|
64
98
|
doc/ex/text_align.rb
|
99
|
+
doc/ex/text01.rb
|
65
100
|
doc/ex/text.rb
|
66
101
|
doc/ex/swirl.rb
|
67
102
|
doc/ex/stroke_width.rb
|
68
103
|
doc/ex/stroke_linejoin.rb
|
69
104
|
doc/ex/stroke_linecap.rb
|
105
|
+
doc/ex/stroke_fill.rb
|
70
106
|
doc/ex/stroke_dasharray.rb
|
71
107
|
doc/ex/stegano.rb
|
72
108
|
doc/ex/spread.rb
|
@@ -77,8 +113,16 @@ doc/ex/skewy.rb
|
|
77
113
|
doc/ex/skewx.rb
|
78
114
|
doc/ex/shear.rb
|
79
115
|
doc/ex/shave.rb
|
116
|
+
doc/ex/shadow.rb
|
80
117
|
doc/ex/shade.rb
|
118
|
+
doc/ex/sepiatone.rb
|
81
119
|
doc/ex/segment.rb
|
120
|
+
doc/ex/rvg_stroke_dasharray.rb
|
121
|
+
doc/ex/rvg_pattern.rb
|
122
|
+
doc/ex/rvg_opacity.rb
|
123
|
+
doc/ex/rvg_linejoin.rb
|
124
|
+
doc/ex/rvg_linecap.rb
|
125
|
+
doc/ex/rvg_clippath.rb
|
82
126
|
doc/ex/rubyname.rb
|
83
127
|
doc/ex/roundrect.rb
|
84
128
|
doc/ex/rotate_f.rb
|
@@ -86,15 +130,20 @@ doc/ex/rotate.rb
|
|
86
130
|
doc/ex/roll.rb
|
87
131
|
doc/ex/reduce_noise.rb
|
88
132
|
doc/ex/rectangle.rb
|
133
|
+
doc/ex/rect02.rb
|
134
|
+
doc/ex/rect01.rb
|
89
135
|
doc/ex/random_threshold_channel.rb
|
90
136
|
doc/ex/random_channel_threshold.rb
|
91
137
|
doc/ex/raise.rb
|
92
138
|
doc/ex/radial_blur.rb
|
93
139
|
doc/ex/quantize-m.rb
|
140
|
+
doc/ex/quad01.rb
|
94
141
|
doc/ex/qbezierpath.rb
|
95
142
|
doc/ex/preview.rb
|
96
143
|
doc/ex/posterize.rb
|
144
|
+
doc/ex/polyline01.rb
|
97
145
|
doc/ex/polyline.rb
|
146
|
+
doc/ex/polygon01.rb
|
98
147
|
doc/ex/polygon.rb
|
99
148
|
doc/ex/pattern2.rb
|
100
149
|
doc/ex/pattern1.rb
|
@@ -104,6 +153,8 @@ doc/ex/opaque.rb
|
|
104
153
|
doc/ex/opacity.rb
|
105
154
|
doc/ex/oil_paint.rb
|
106
155
|
doc/ex/normalize.rb
|
156
|
+
doc/ex/nonzero.rb
|
157
|
+
doc/ex/nested_rvg.rb
|
107
158
|
doc/ex/negate_channel.rb
|
108
159
|
doc/ex/negate.rb
|
109
160
|
doc/ex/motion_blur.rb
|
@@ -117,11 +168,14 @@ doc/ex/matte_floodfill.rb
|
|
117
168
|
doc/ex/matte_fill_to_border.rb
|
118
169
|
doc/ex/map_f.rb
|
119
170
|
doc/ex/map.rb
|
171
|
+
doc/ex/line01.rb
|
120
172
|
doc/ex/line.rb
|
121
173
|
doc/ex/level_channel.rb
|
122
174
|
doc/ex/level.rb
|
123
175
|
doc/ex/implode.rb
|
176
|
+
doc/ex/image.rb
|
124
177
|
doc/ex/hatchfill.rb
|
178
|
+
doc/ex/group.rb
|
125
179
|
doc/ex/gravity.rb
|
126
180
|
doc/ex/grav.rb
|
127
181
|
doc/ex/gradientfill.rb
|
@@ -131,18 +185,23 @@ doc/ex/get_multiline_type_metrics.rb
|
|
131
185
|
doc/ex/gaussian_blur.rb
|
132
186
|
doc/ex/frame.rb
|
133
187
|
doc/ex/fonts.rb
|
188
|
+
doc/ex/font_styles.rb
|
134
189
|
doc/ex/flop.rb
|
135
190
|
doc/ex/flip.rb
|
136
191
|
doc/ex/flatten_images.rb
|
192
|
+
doc/ex/evenodd.rb
|
137
193
|
doc/ex/equalize.rb
|
138
194
|
doc/ex/enhance.rb
|
139
195
|
doc/ex/emboss.rb
|
196
|
+
doc/ex/ellipse01.rb
|
140
197
|
doc/ex/ellipse.rb
|
141
198
|
doc/ex/edge.rb
|
142
199
|
doc/ex/drop_shadow.rb
|
143
200
|
doc/ex/drawcomp.rb
|
144
201
|
doc/ex/demo.rb
|
145
202
|
doc/ex/cycle_colormap.rb
|
203
|
+
doc/ex/cubic02.rb
|
204
|
+
doc/ex/cubic01.rb
|
146
205
|
doc/ex/crop_with_gravity.rb
|
147
206
|
doc/ex/crop.rb
|
148
207
|
doc/ex/contrast.rb
|
@@ -155,6 +214,7 @@ doc/ex/color_floodfill.rb
|
|
155
214
|
doc/ex/color_fill_to_border.rb
|
156
215
|
doc/ex/coalesce.rb
|
157
216
|
doc/ex/clip_path.rb
|
217
|
+
doc/ex/circle01.rb
|
158
218
|
doc/ex/circle.rb
|
159
219
|
doc/ex/chop.rb
|
160
220
|
doc/ex/charcoal.rb
|
@@ -170,8 +230,11 @@ doc/ex/bounding_box.rb
|
|
170
230
|
doc/ex/border.rb
|
171
231
|
doc/ex/blur_image.rb
|
172
232
|
doc/ex/bilevel_channel.rb
|
233
|
+
doc/ex/baseline_shift01.rb
|
173
234
|
doc/ex/axes.rb
|
174
235
|
doc/ex/average.rb
|
236
|
+
doc/ex/arcs02.rb
|
237
|
+
doc/ex/arcs01.rb
|
175
238
|
doc/ex/arcpath.rb
|
176
239
|
doc/ex/arc.rb
|
177
240
|
doc/ex/affine_transform.rb
|
@@ -179,6 +242,16 @@ doc/ex/affine.rb
|
|
179
242
|
doc/ex/add_noise.rb
|
180
243
|
doc/ex/adaptive_threshold.rb
|
181
244
|
doc/ex/Zconstitute.rb
|
245
|
+
doc/ex/ViewBox.rb
|
246
|
+
doc/ex/Use03.rb
|
247
|
+
doc/ex/Use02.rb
|
248
|
+
doc/ex/Use01.rb
|
249
|
+
doc/ex/Skew.rb
|
250
|
+
doc/ex/RotateScale.rb
|
251
|
+
doc/ex/PreserveAspectRatio.rb
|
252
|
+
doc/ex/OrigCoordSys.rb
|
253
|
+
doc/ex/NewCoordSys.rb
|
254
|
+
doc/ex/InitialCoords.rb
|
182
255
|
doc/ex/Adispatch.rb
|
183
256
|
doc/ex/images/spin.gif
|
184
257
|
doc/ex/images/smile.miff
|
@@ -186,6 +259,24 @@ doc/ex/images/notimplemented.gif
|
|
186
259
|
doc/ex/images/model.miff
|
187
260
|
doc/ex/images/logo400x83.gif
|
188
261
|
doc/ex/images/graydient230x6.gif
|
262
|
+
doc/ex/images/duck9.gif
|
263
|
+
doc/ex/images/duck8.gif
|
264
|
+
doc/ex/images/duck7.gif
|
265
|
+
doc/ex/images/duck6.gif
|
266
|
+
doc/ex/images/duck5.gif
|
267
|
+
doc/ex/images/duck4.gif
|
268
|
+
doc/ex/images/duck3.gif
|
269
|
+
doc/ex/images/duck2.gif
|
270
|
+
doc/ex/images/duck15.gif
|
271
|
+
doc/ex/images/duck14.gif
|
272
|
+
doc/ex/images/duck13.gif
|
273
|
+
doc/ex/images/duck12.gif
|
274
|
+
doc/ex/images/duck11.gif
|
275
|
+
doc/ex/images/duck10.gif
|
276
|
+
doc/ex/images/duck1.gif
|
277
|
+
doc/ex/images/duck0.gif
|
278
|
+
doc/ex/images/duck.gif
|
279
|
+
doc/ex/images/big-duck.gif
|
189
280
|
doc/ex/images/Violin.jpg
|
190
281
|
doc/ex/images/Snake.wmf
|
191
282
|
doc/ex/images/Shorts.jpg
|
@@ -236,5 +327,6 @@ doc/ex/images/Button_1.gif
|
|
236
327
|
doc/ex/images/Button_0.gif
|
237
328
|
doc/ex/images/Ballerina3.jpg
|
238
329
|
doc/ex/images/Ballerina.jpg
|
330
|
+
doc/css/ref.css
|
239
331
|
doc/css/doc.css
|
240
332
|
doc/css/popup.css
|
data/ext/RMagick/rmagick.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmagick.h,v 1.
|
1
|
+
/* $Id: rmagick.h,v 1.82 2005/04/28 23:41:54 rmagick Exp $ */
|
2
2
|
/*=============================================================================
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmagick.h
|
5
5
|
| Purpose: RMagick declarations and definitions
|
6
6
|
| Author: Tim Hunter
|
@@ -587,6 +587,9 @@ extern VALUE Info_new(VALUE);
|
|
587
587
|
#endif
|
588
588
|
|
589
589
|
extern VALUE Info_define(int, VALUE *, VALUE);
|
590
|
+
extern VALUE Info_aset(VALUE, VALUE, VALUE, VALUE);
|
591
|
+
extern VALUE Info_aref(VALUE, VALUE, VALUE);
|
592
|
+
extern VALUE Info_undefine(VALUE, VALUE, VALUE);
|
590
593
|
extern VALUE Info_initialize(VALUE);
|
591
594
|
extern VALUE rm_info_new(void);
|
592
595
|
|
@@ -776,13 +779,16 @@ extern VALUE Image_sample_bang(int, VALUE *, VALUE);
|
|
776
779
|
extern VALUE Image_scale(int, VALUE *, VALUE);
|
777
780
|
extern VALUE Image_scale_bang(int, VALUE *, VALUE);
|
778
781
|
extern VALUE Image_segment(int, VALUE *, VALUE);
|
782
|
+
extern VALUE Image_sepiatone(int, VALUE *, VALUE);
|
779
783
|
extern VALUE Image_set_channel_depth(VALUE, VALUE, VALUE);
|
780
784
|
extern VALUE Image_shade(int, VALUE *, VALUE);
|
785
|
+
extern VALUE Image_shadow(int, VALUE *, VALUE);
|
781
786
|
extern VALUE Image_sharpen(int, VALUE *, VALUE);
|
782
787
|
extern VALUE Image_sharpen_channel(int, VALUE *, VALUE);
|
783
788
|
extern VALUE Image_shave(VALUE, VALUE, VALUE);
|
784
789
|
extern VALUE Image_shave_bang(VALUE, VALUE, VALUE);
|
785
790
|
extern VALUE Image_shear(VALUE, VALUE, VALUE);
|
791
|
+
extern VALUE Image_sigmoidal_contrast_channel(int, VALUE *, VALUE);
|
786
792
|
extern VALUE Image_signature(VALUE);
|
787
793
|
extern VALUE Image_solarize(int, VALUE *, VALUE);
|
788
794
|
extern VALUE Image_spaceship(VALUE, VALUE);
|
@@ -930,8 +936,8 @@ extern char *rm_string_value_ptr(volatile VALUE *);
|
|
930
936
|
extern char *rm_string_value_ptr_len(volatile VALUE *, long *);
|
931
937
|
extern void rm_check_ary_len(VALUE, int);
|
932
938
|
extern void rm_check_frozen(VALUE);
|
933
|
-
extern
|
934
|
-
extern double
|
939
|
+
extern double rm_fuzz_to_dbl(VALUE);
|
940
|
+
extern double rm_percentage(VALUE);
|
935
941
|
extern VALUE rm_define_enum_type(char *);
|
936
942
|
extern void rm_write_temp_image(Image *, char *);
|
937
943
|
extern void rm_delete_temp_image(char *);
|
@@ -100,8 +100,6 @@
|
|
100
100
|
#undef HAVE_INDEXCHANNEL
|
101
101
|
/* Introduced in IM 5.5.6 */
|
102
102
|
#undef HAVE_IMAGE_EXTRACT_INFO
|
103
|
-
/* Introduced in IM 6.1.0 */
|
104
|
-
#undef HAVE_IMAGE_QUALITY
|
105
103
|
/* Introduced in IM 6.0.0 */
|
106
104
|
#undef HAVE_IMAGE_ORIENTATION
|
107
105
|
/* Introduced in IM 5.5.6 */
|
@@ -109,6 +107,8 @@
|
|
109
107
|
/* Introduced in IM 5.5.7, GM 1.1 */
|
110
108
|
#undef HAVE_IMPORTIMAGEPIXELS
|
111
109
|
#undef HAVE_INTTYPES_H
|
110
|
+
/* Introduced in IM 6.2.2 */
|
111
|
+
#undef HAVE_JPEG2000COMPRESSION
|
112
112
|
/* Introduced in IM 5.5.3, GM 1.0 */
|
113
113
|
#undef HAVE_LEVELIMAGECHANNEL
|
114
114
|
/* Introduced in IM 6.0.2 */
|
@@ -142,13 +142,19 @@
|
|
142
142
|
#undef HAVE_NEW_REMOVEIMAGEPROFILE
|
143
143
|
#undef HAVE_REPLACECOMPOSITEOP
|
144
144
|
#undef HAVE_SEPARATEIMAGECHANNEL
|
145
|
+
/* Introduced in IM 6.2.1 */
|
146
|
+
#undef HAVE_SEPIATONEIMAGE
|
145
147
|
#undef HAVE_SETIMAGECOLORSPACE
|
146
148
|
/* Introduced in IM 6.0.0, GM 1.1 */
|
147
149
|
#undef HAVE_SETIMAGECHANNELDEPTH
|
148
150
|
#undef HAVE_SETIMAGEOPTION
|
149
151
|
#undef HAVE_SETLOGFORMAT
|
152
|
+
/* Introduced in IM 6.1.7 */
|
153
|
+
#undef HAVE_SHADOWIMAGE
|
150
154
|
/* Introduced in IM 6.0.1 */
|
151
155
|
#undef HAVE_SHARPENIMAGECHANNEL
|
156
|
+
/* Introduced in IM 6.2.1 */
|
157
|
+
#undef HAVE_SIGMOIDALCONTRASTIMAGECHANNEL
|
152
158
|
#undef HAVE_SNPRINTF
|
153
159
|
#undef HAVE_SPLICEIMAGE
|
154
160
|
#undef HAVE_STDINT_H
|
data/ext/RMagick/rmdraw.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmdraw.c,v 1.
|
1
|
+
/* $Id: rmdraw.c,v 1.22 2005/03/05 16:18:39 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmdraw.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: Contains Draw class methods.
|
data/ext/RMagick/rmfill.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmfill.c,v 1.
|
1
|
+
/* $Id: rmfill.c,v 1.11 2005/03/05 16:18:39 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmfill.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: GradientFill, TextureFill class definitions for RMagick
|
data/ext/RMagick/rmilist.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmilist.c,v 1.
|
1
|
+
/* $Id: rmilist.c,v 1.22 2005/03/05 16:18:39 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmilist.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: ImageList class method definitions for RMagick
|
@@ -639,7 +639,7 @@ ImageList_write(VALUE self, VALUE file)
|
|
639
639
|
else
|
640
640
|
{
|
641
641
|
// Convert arg to string. Catch exceptions.
|
642
|
-
file = rb_rescue(
|
642
|
+
file = rb_rescue(rb_String, file, file_arg_rescue, file);
|
643
643
|
|
644
644
|
// Copy the filename to the Info and to the Image.
|
645
645
|
filename = STRING_PTR_LEN(file, filenameL);
|
data/ext/RMagick/rmimage.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmimage.c,v 1.
|
1
|
+
/* $Id: rmimage.c,v 1.97 2005/04/30 15:26:45 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmimage.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: Image class method definitions for RMagick
|
@@ -5884,10 +5884,10 @@ rd_image(VALUE class, VALUE file, reader_t reader)
|
|
5884
5884
|
else
|
5885
5885
|
{
|
5886
5886
|
// Convert arg to string. If an exception occurs raise an error condition.
|
5887
|
-
file = rb_rescue(
|
5887
|
+
file = rb_rescue(rb_String, file, file_arg_rescue, file);
|
5888
5888
|
|
5889
5889
|
filename = STRING_PTR_LEN(file, filename_l);
|
5890
|
-
filename_l = min(filename_l,
|
5890
|
+
filename_l = min(filename_l, MaxTextExtent-1);
|
5891
5891
|
memcpy(info->filename, filename, (size_t)filename_l);
|
5892
5892
|
info->filename[filename_l] = '\0';
|
5893
5893
|
info->file = NULL; // Reset FILE *, if any
|
@@ -6303,6 +6303,43 @@ Image_set_channel_depth(VALUE self, VALUE channel_arg, VALUE depth)
|
|
6303
6303
|
}
|
6304
6304
|
|
6305
6305
|
|
6306
|
+
/*
|
6307
|
+
* Method: Image#sepiatone(threshold=MaxRGB)
|
6308
|
+
* Purpose: Call SepiaToneImage
|
6309
|
+
*/
|
6310
|
+
VALUE
|
6311
|
+
Image_sepiatone(int argc, VALUE *argv, VALUE self)
|
6312
|
+
{
|
6313
|
+
#if defined(HAVE_SEPIATONEIMAGE)
|
6314
|
+
Image *image, *new_image;
|
6315
|
+
double threshold = (double) MaxRGB;
|
6316
|
+
ExceptionInfo exception;
|
6317
|
+
|
6318
|
+
Data_Get_Struct(self, Image, image);
|
6319
|
+
GetExceptionInfo(&exception);
|
6320
|
+
|
6321
|
+
switch(argc)
|
6322
|
+
{
|
6323
|
+
case 1:
|
6324
|
+
threshold = NUM2DBL(argv[0]);
|
6325
|
+
break;
|
6326
|
+
case 0:
|
6327
|
+
break;
|
6328
|
+
default:
|
6329
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 or 1)", argc);
|
6330
|
+
}
|
6331
|
+
|
6332
|
+
new_image = SepiaToneImage(image, threshold, &exception);
|
6333
|
+
HANDLE_ERROR
|
6334
|
+
|
6335
|
+
return rm_image_new(new_image);
|
6336
|
+
#else
|
6337
|
+
rm_not_implemented();
|
6338
|
+
return (VALUE)0;
|
6339
|
+
#endif
|
6340
|
+
}
|
6341
|
+
|
6342
|
+
|
6306
6343
|
/*
|
6307
6344
|
Method: Image#segment(colorspace=RGBColorspace,
|
6308
6345
|
cluster_threshold=1.0,
|
@@ -6409,6 +6446,69 @@ Image_shade(int argc, VALUE *argv, VALUE self)
|
|
6409
6446
|
return rm_image_new(new_image);
|
6410
6447
|
}
|
6411
6448
|
|
6449
|
+
|
6450
|
+
/*
|
6451
|
+
Method: Image#shadow(x_offset=4, y_offset=4, sigma=4.0, opacity=1.0)
|
6452
|
+
x- and y-offsets are the pixel offset
|
6453
|
+
opacity is either a number between 0 and 1 or a string "NN%"
|
6454
|
+
sigma is the std. dev. of the Gaussian, in pixels.
|
6455
|
+
Purpose: Call ShadowImage
|
6456
|
+
Notes: The defaults are taken from the mogrify.c source, except
|
6457
|
+
for opacity, which has no default.
|
6458
|
+
Introduced in 6.1.7
|
6459
|
+
*/
|
6460
|
+
VALUE
|
6461
|
+
Image_shadow(int argc, VALUE *argv, VALUE self)
|
6462
|
+
{
|
6463
|
+
#if defined(HAVE_SHADOWIMAGE)
|
6464
|
+
Image *image, *new_image;
|
6465
|
+
double opacity = 100.0;
|
6466
|
+
double sigma = 4.0;
|
6467
|
+
long x_offset = 4L;
|
6468
|
+
long y_offset = 4L;
|
6469
|
+
ExceptionInfo exception;
|
6470
|
+
|
6471
|
+
switch(argc)
|
6472
|
+
{
|
6473
|
+
case 4:
|
6474
|
+
opacity = rm_percentage(argv[3]); // Clamp to 1.0 < x <= 100.0
|
6475
|
+
if (fabs(opacity) < 0.01)
|
6476
|
+
{
|
6477
|
+
rb_warning("shadow will be transparent - opacity %g very small", opacity);
|
6478
|
+
}
|
6479
|
+
opacity = fmin(opacity, 1.0);
|
6480
|
+
opacity = fmax(opacity, 0.01);
|
6481
|
+
opacity *= 100.0;
|
6482
|
+
case 3:
|
6483
|
+
sigma = NUM2DBL(argv[2]);
|
6484
|
+
case 2:
|
6485
|
+
y_offset = NUM2ULONG(argv[1]);
|
6486
|
+
case 1:
|
6487
|
+
x_offset = NUM2ULONG(argv[0]);
|
6488
|
+
case 0:
|
6489
|
+
break;
|
6490
|
+
default:
|
6491
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 4)", argc);
|
6492
|
+
break;
|
6493
|
+
}
|
6494
|
+
|
6495
|
+
Data_Get_Struct(self, Image, image);
|
6496
|
+
GetExceptionInfo(&exception);
|
6497
|
+
|
6498
|
+
new_image = ShadowImage(image, opacity, sigma, x_offset, y_offset, &exception);
|
6499
|
+
if (!new_image)
|
6500
|
+
{
|
6501
|
+
rb_raise(rb_eNoMemError, "not enough memory to continue");
|
6502
|
+
}
|
6503
|
+
HANDLE_ERROR_IMG(new_image)
|
6504
|
+
|
6505
|
+
return rm_image_new(new_image);
|
6506
|
+
#else
|
6507
|
+
rm_not_implemented();
|
6508
|
+
return (VALUE)0;
|
6509
|
+
#endif
|
6510
|
+
}
|
6511
|
+
|
6412
6512
|
/*
|
6413
6513
|
Method: Image#shave(width, height)
|
6414
6514
|
Image#shave!(width, height)
|
@@ -6517,6 +6617,53 @@ Image_shear(
|
|
6517
6617
|
return rm_image_new(new_image);
|
6518
6618
|
}
|
6519
6619
|
|
6620
|
+
|
6621
|
+
/*
|
6622
|
+
* Method: Image#sigmoidal_contrast_channel(contrast=3.0, midpoint=50.0,
|
6623
|
+
sharpen=false [, channel=AllChannels]);
|
6624
|
+
*/
|
6625
|
+
VALUE
|
6626
|
+
Image_sigmoidal_contrast_channel(int argc, VALUE *argv, VALUE self)
|
6627
|
+
{
|
6628
|
+
#if defined(HAVE_SIGMOIDALCONTRASTIMAGECHANNEL)
|
6629
|
+
Image *image, *new_image;
|
6630
|
+
MagickBooleanType sharpen = MagickFalse;
|
6631
|
+
double contrast = 3.0;
|
6632
|
+
double midpoint = 50.0;
|
6633
|
+
ChannelType channels;
|
6634
|
+
ExceptionInfo exception;
|
6635
|
+
|
6636
|
+
Data_Get_Struct(self, Image, image);
|
6637
|
+
GetExceptionInfo(&exception);
|
6638
|
+
|
6639
|
+
channels = extract_channels(&argc, argv);
|
6640
|
+
|
6641
|
+
switch(argc)
|
6642
|
+
{
|
6643
|
+
case 3:
|
6644
|
+
sharpen = RTEST(argv[2]);
|
6645
|
+
case 2:
|
6646
|
+
midpoint = NUM2DBL(argv[1]);
|
6647
|
+
case 1:
|
6648
|
+
contrast = NUM2DBL(argv[0]);
|
6649
|
+
case 0:
|
6650
|
+
break;
|
6651
|
+
default:
|
6652
|
+
raise_ChannelType_error(argv[argc-1]);
|
6653
|
+
break;
|
6654
|
+
}
|
6655
|
+
|
6656
|
+
new_image = CloneImage(image, 0, 0, True, &exception);
|
6657
|
+
HANDLE_ERROR
|
6658
|
+
(void) SigmoidalContrastImageChannel(new_image, channels, sharpen, contrast, midpoint);
|
6659
|
+
|
6660
|
+
return rm_image_new(new_image);
|
6661
|
+
#else
|
6662
|
+
rm_not_implemented();
|
6663
|
+
return (VALUE)0;
|
6664
|
+
#endif
|
6665
|
+
}
|
6666
|
+
|
6520
6667
|
/*
|
6521
6668
|
Method: Image#signature
|
6522
6669
|
Purpose: computes a message digest from an image pixel stream with an
|
@@ -7746,7 +7893,7 @@ Image_write(VALUE self, VALUE file)
|
|
7746
7893
|
// SetImageInfo. (Ref: ImageMagick's utilities/convert.c.)
|
7747
7894
|
|
7748
7895
|
// Convert arg to string. If an exception occurs raise an error condition.
|
7749
|
-
file = rb_rescue(
|
7896
|
+
file = rb_rescue(rb_String, file, file_arg_rescue, file);
|
7750
7897
|
|
7751
7898
|
filename = STRING_PTR_LEN(file, filename_l);
|
7752
7899
|
filename_l = min(filename_l, MaxTextExtent-1);
|