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.

Files changed (52) hide show
  1. data/ChangeLog +29 -0
  2. data/README.html +7 -7
  3. data/doc/comtasks.html +2 -2
  4. data/doc/constants.html +22 -5
  5. data/doc/draw.html +2 -2
  6. data/doc/ex/affinity.rb +12 -0
  7. data/doc/ex/affinity_images.rb +21 -0
  8. data/doc/ex/composite_tiled.rb +23 -0
  9. data/doc/ex/images/Apple.miff +0 -0
  10. data/doc/ex/images/Leaf.miff +0 -0
  11. data/doc/ex/images/Rocks_On_Beach.miff +0 -0
  12. data/doc/ex/images/Yellow_Rose.miff +0 -0
  13. data/doc/ex/level_colors.rb +11 -0
  14. data/doc/ilist.html +72 -30
  15. data/doc/image1.html +305 -34
  16. data/doc/image2.html +144 -18
  17. data/doc/image3.html +111 -8
  18. data/doc/imageattrs.html +10 -2
  19. data/doc/imusage.html +5 -5
  20. data/doc/index.html +3 -3
  21. data/doc/info.html +2 -2
  22. data/doc/magick.html +2 -2
  23. data/doc/optequiv.html +54 -9
  24. data/doc/rvg.html +2 -2
  25. data/doc/rvgclip.html +2 -2
  26. data/doc/rvggroup.html +2 -2
  27. data/doc/rvgimage.html +2 -2
  28. data/doc/rvgpattern.html +2 -2
  29. data/doc/rvgshape.html +2 -2
  30. data/doc/rvgstyle.html +2 -2
  31. data/doc/rvgtext.html +2 -2
  32. data/doc/rvgtspan.html +2 -2
  33. data/doc/rvgtut.html +2 -2
  34. data/doc/rvguse.html +2 -2
  35. data/doc/rvgxform.html +2 -2
  36. data/doc/struct.html +2 -2
  37. data/doc/usage.html +27 -8
  38. data/ext/RMagick/MANIFEST +9 -3
  39. data/ext/RMagick/extconf.rb +19 -3
  40. data/ext/RMagick/rmagick.h +23 -7
  41. data/ext/RMagick/rmdraw.c +74 -22
  42. data/ext/RMagick/rmfill.c +2 -2
  43. data/ext/RMagick/rmilist.c +79 -29
  44. data/ext/RMagick/rmimage.c +904 -393
  45. data/ext/RMagick/rminfo.c +9 -9
  46. data/ext/RMagick/rmmain.c +64 -9
  47. data/ext/RMagick/rmutil.c +158 -44
  48. data/lib/RMagick.rb +32 -1
  49. data/rmagick.gemspec +1 -1
  50. metadata +10 -4
  51. data/doc/ex/map.rb +0 -28
  52. data/doc/ex/map_f.rb +0 -15
@@ -1,4 +1,4 @@
1
- # $Id: RMagick.rb,v 1.72 2008/06/08 13:41:39 rmagick Exp $
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.
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{rmagick}
4
- s.version = "2.5.2"
4
+ s.version = "2.6.0"
5
5
  s.date = Date.today.to_s
6
6
  s.summary = %q{Ruby binding to ImageMagick}
7
7
  s.description = %q{RMagick is an interface between Ruby and ImageMagick.}
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.5.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-07-15 00:00:00 -04:00
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
@@ -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
@@ -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')