rmagick 2.5.2 → 2.6.0
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 +29 -0
- data/README.html +7 -7
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +22 -5
- data/doc/draw.html +2 -2
- data/doc/ex/affinity.rb +12 -0
- data/doc/ex/affinity_images.rb +21 -0
- data/doc/ex/composite_tiled.rb +23 -0
- data/doc/ex/images/Apple.miff +0 -0
- data/doc/ex/images/Leaf.miff +0 -0
- data/doc/ex/images/Rocks_On_Beach.miff +0 -0
- data/doc/ex/images/Yellow_Rose.miff +0 -0
- data/doc/ex/level_colors.rb +11 -0
- data/doc/ilist.html +72 -30
- data/doc/image1.html +305 -34
- data/doc/image2.html +144 -18
- data/doc/image3.html +111 -8
- data/doc/imageattrs.html +10 -2
- data/doc/imusage.html +5 -5
- data/doc/index.html +3 -3
- data/doc/info.html +2 -2
- data/doc/magick.html +2 -2
- data/doc/optequiv.html +54 -9
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +2 -2
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +2 -2
- data/doc/usage.html +27 -8
- data/ext/RMagick/MANIFEST +9 -3
- data/ext/RMagick/extconf.rb +19 -3
- data/ext/RMagick/rmagick.h +23 -7
- data/ext/RMagick/rmdraw.c +74 -22
- data/ext/RMagick/rmfill.c +2 -2
- data/ext/RMagick/rmilist.c +79 -29
- data/ext/RMagick/rmimage.c +904 -393
- data/ext/RMagick/rminfo.c +9 -9
- data/ext/RMagick/rmmain.c +64 -9
- data/ext/RMagick/rmutil.c +158 -44
- data/lib/RMagick.rb +32 -1
- data/rmagick.gemspec +1 -1
- metadata +10 -4
- data/doc/ex/map.rb +0 -28
- data/doc/ex/map_f.rb +0 -15
data/lib/RMagick.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: RMagick.rb,v 1.
|
1
|
+
# $Id: RMagick.rb,v 1.74 2008/08/28 23:25:46 rmagick Exp $
|
2
2
|
#==============================================================================
|
3
3
|
# Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
# Name: RMagick.rb
|
@@ -1833,6 +1833,37 @@ public
|
|
1833
1833
|
|
1834
1834
|
end # Magick::ImageList
|
1835
1835
|
|
1836
|
+
|
1837
|
+
# Collects non-specific optional method arguments
|
1838
|
+
class OptionalMethodArguments
|
1839
|
+
def initialize(img)
|
1840
|
+
@img = img
|
1841
|
+
end
|
1842
|
+
|
1843
|
+
# miscellaneous options like -verbose
|
1844
|
+
def method_missing(mth, val)
|
1845
|
+
@img.define(mth.to_s.tr('_', '-'), val)
|
1846
|
+
end
|
1847
|
+
|
1848
|
+
# set(key, val) corresponds to -set option:key val
|
1849
|
+
def define(key, val = nil)
|
1850
|
+
@img.define(key, val)
|
1851
|
+
end
|
1852
|
+
|
1853
|
+
# accepts Pixel object or color name
|
1854
|
+
def highlight_color=(color)
|
1855
|
+
color = @img.to_color(color) if color.respond_to?(:to_color)
|
1856
|
+
@img.define("highlight-color", color)
|
1857
|
+
end
|
1858
|
+
|
1859
|
+
# accepts Pixel object or color name
|
1860
|
+
def lowlight_color=(color)
|
1861
|
+
color = @img.to_color(color) if color.respond_to?(:to_color)
|
1862
|
+
@img.define("lowlight-color", color)
|
1863
|
+
end
|
1864
|
+
end
|
1865
|
+
|
1866
|
+
|
1836
1867
|
# Example fill class. Fills the image with the specified background
|
1837
1868
|
# color, then crosshatches with the specified crosshatch color.
|
1838
1869
|
# @dist is the number of pixels between hatch lines.
|
data/rmagick.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmagick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Hunter
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-10 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -134,7 +134,6 @@ files:
|
|
134
134
|
- doc/ex/cubic02.rb
|
135
135
|
- doc/ex/tspan02.rb
|
136
136
|
- doc/ex/implode.rb
|
137
|
-
- doc/ex/map_f.rb
|
138
137
|
- doc/ex/morph.rb
|
139
138
|
- doc/ex/flatten_images.rb
|
140
139
|
- doc/ex/tspan01.rb
|
@@ -145,9 +144,10 @@ files:
|
|
145
144
|
- doc/ex/crop.rb
|
146
145
|
- doc/ex/text01.rb
|
147
146
|
- doc/ex/composite_layers.rb
|
147
|
+
- doc/ex/level_colors.rb
|
148
|
+
- doc/ex/affinity_images.rb
|
148
149
|
- doc/ex/polyline.rb
|
149
150
|
- doc/ex/get_pixels.rb
|
150
|
-
- doc/ex/map.rb
|
151
151
|
- doc/ex/equalize.rb
|
152
152
|
- doc/ex/rvg_opacity.rb
|
153
153
|
- doc/ex/rect02.rb
|
@@ -181,6 +181,8 @@ files:
|
|
181
181
|
- doc/ex/color_fill_to_border.rb
|
182
182
|
- doc/ex/wave.rb
|
183
183
|
- doc/ex/shave.rb
|
184
|
+
- doc/ex/composite_tiled.rb
|
185
|
+
- doc/ex/affinity.rb
|
184
186
|
- doc/ex/pattern2.rb
|
185
187
|
- doc/ex/bounding_box.rb
|
186
188
|
- doc/ex/rvg_clippath.rb
|
@@ -284,8 +286,11 @@ files:
|
|
284
286
|
- doc/ex/images/Polynesia.jpg
|
285
287
|
- doc/ex/images/Button_X.gif
|
286
288
|
- doc/ex/images/Button_5.gif
|
289
|
+
- doc/ex/images/Yellow_Rose.miff
|
287
290
|
- doc/ex/images/model.miff
|
291
|
+
- doc/ex/images/Apple.miff
|
288
292
|
- doc/ex/images/Hot_Air_Balloons_H.jpg
|
293
|
+
- doc/ex/images/Leaf.miff
|
289
294
|
- doc/ex/images/Flower_Hat.jpg
|
290
295
|
- doc/ex/images/Shorts.jpg
|
291
296
|
- doc/ex/images/Button_1.gif
|
@@ -314,6 +319,7 @@ files:
|
|
314
319
|
- doc/ex/images/Button_L.gif
|
315
320
|
- doc/ex/images/Violin.jpg
|
316
321
|
- doc/ex/images/Button_U.gif
|
322
|
+
- doc/ex/images/Rocks_On_Beach.miff
|
317
323
|
- doc/ex/images/Ballerina3.jpg
|
318
324
|
- doc/ex/images/Button_O.gif
|
319
325
|
- doc/ex/images/duck7.gif
|
data/doc/ex/map.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
#! /usr/local/bin/ruby -w
|
2
|
-
|
3
|
-
# Demonstrate the map, append, and composite methods by
|
4
|
-
# mapping the colors in three separate images into the
|
5
|
-
# 216 "Web-safe" colors.
|
6
|
-
|
7
|
-
require 'RMagick'
|
8
|
-
|
9
|
-
# Read three images.
|
10
|
-
unmapped = Magick::ImageList.new("images/Hot_Air_Balloons.jpg","images/Violin.jpg","images/Polynesia.jpg")
|
11
|
-
|
12
|
-
# "Read" the Netscape 216-color cube
|
13
|
-
map = Magick::ImageList.new "netscape:"
|
14
|
-
|
15
|
-
# Map the group of unmapped into the Netscape colors
|
16
|
-
$stdout.sync = true
|
17
|
-
printf "Mapping... Please be patient, this may take a few seconds... "
|
18
|
-
mapped = unmapped.map map, false
|
19
|
-
puts "Done."
|
20
|
-
|
21
|
-
# Use the append method to arrange the unmapped images
|
22
|
-
# side-by-side into a single image. Repeat for the mapped images.
|
23
|
-
before = unmapped.append false
|
24
|
-
before.write 'map_before.jpg'
|
25
|
-
|
26
|
-
after = mapped.append false
|
27
|
-
after.write 'map_after.jpg'
|
28
|
-
exit
|
data/doc/ex/map_f.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#! /usr/local/bin/ruby -w
|
2
|
-
require 'RMagick'
|
3
|
-
|
4
|
-
# Demonstrate the Image#map method
|
5
|
-
|
6
|
-
img = Magick::Image.read('images/Flower_Hat.jpg')[0]
|
7
|
-
|
8
|
-
# "Read" the builtin Netscape format, which
|
9
|
-
# contains the 216 colors in the Netscape palette.
|
10
|
-
nsmap = Magick::Image.read('netscape:')[0]
|
11
|
-
|
12
|
-
# Map the original image colors into the Netscape colors.
|
13
|
-
after = img.map(nsmap)
|
14
|
-
|
15
|
-
after.write('map_f.jpg')
|