image_voodoo 0.7 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -5,10 +5,10 @@ README.txt
5
5
  LICENSE.txt
6
6
  lib/image_science.rb
7
7
  lib/image_voodoo
8
+ lib/image_voodoo.rb
8
9
  lib/image_voodoo/awt.rb
9
10
  lib/image_voodoo/gae.rb
10
11
  lib/image_voodoo/version.rb
11
- lib/image_voodoo.rb
12
12
  samples/bench.rb
13
13
  samples/checkerboard.jpg
14
14
  samples/file_greyscale.rb
data/README.txt CHANGED
@@ -6,6 +6,7 @@ ImageVoodoo is an Image manipulation library with a ImageScience-compatible API
6
6
  for JRuby.
7
7
 
8
8
  http://jruby-extras.rubyforge.org/image_voodoo/
9
+ http://github.com/jruby/image_voodoo
9
10
 
10
11
  == FEATURES/PROBLEMS:
11
12
 
data/Rakefile CHANGED
@@ -10,7 +10,8 @@ $LOAD_PATH << 'lib'
10
10
  require 'image_voodoo/version'
11
11
  begin
12
12
  require 'hoe'
13
- Hoe.new("image_voodoo", ImageVoodoo::VERSION) do |p|
13
+ Hoe.spec("image_voodoo") do |p|
14
+ p.version = ImageVoodoo::VERSION
14
15
  p.rubyforge_name = "jruby-extras"
15
16
  p.url = "http://jruby-extras.rubyforge.org/image_voodoo"
16
17
  p.author = "Thomas Enebo, Charles Nutter and JRuby contributors"
@@ -18,7 +19,7 @@ begin
18
19
  p.summary = "Image manipulation in JRuby with ImageScience compatible API"
19
20
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
20
21
  p.description = "Install this gem and require 'image_voodoo' to load the library."
21
- end.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
22
+ end
22
23
  rescue LoadError
23
24
  puts "You need Hoe installed to be able to package this gem"
24
25
  rescue => e
data/lib/image_voodoo.rb CHANGED
@@ -63,7 +63,10 @@ class ImageVoodoo
63
63
  end
64
64
 
65
65
  #
66
- # Write current image out as a stream of bytes using provided format.
66
+ # Get current image bytes as a String using provided format. Format parameter
67
+ # is the informal name of an image type - for instance,
68
+ # "bmp" or "jpg". If the backend is AWT the types available are listed in
69
+ # javax.imageio.ImageIO.getWriterFormatNames()
67
70
  #
68
71
  def bytes(format)
69
72
  java_bytes = guard { bytes_impl(format) }
@@ -3,7 +3,7 @@ class ImageVoodoo
3
3
  java_import java.awt.color.ColorSpace
4
4
  java_import java.awt.geom.AffineTransform
5
5
  java_import java.awt.image.BufferedImage
6
- java_import java.awt.image.ByteLookupTable
6
+ java_import java.awt.image.ShortLookupTable
7
7
  java_import java.awt.image.ColorConvertOp
8
8
  java_import java.awt.image.LookupOp
9
9
  java_import java.awt.image.RescaleOp
@@ -12,7 +12,7 @@ class ImageVoodoo
12
12
  java_import javax.imageio.ImageIO
13
13
  java_import javax.swing.JFrame
14
14
 
15
- NEGATIVE_OP = LookupOp.new(ByteLookupTable.new(0, (0...254).to_a.reverse.to_java(:byte)), nil)
15
+ NEGATIVE_OP = LookupOp.new(ShortLookupTable.new(0, (0...255).to_a.reverse.to_java(:short)), nil)
16
16
  GREY_OP = ColorConvertOp.new(ColorSpace.getInstance(ColorSpace::CS_GRAY), nil)
17
17
  ARGB = BufferedImage::TYPE_INT_ARGB
18
18
  RGB = BufferedImage::TYPE_INT_RGB
@@ -6,14 +6,20 @@ class ImageVoodoo
6
6
 
7
7
  ImageService = ImagesServiceFactory.images_service
8
8
 
9
+ #--
9
10
  # Value Add methods for this backend
11
+ #++
10
12
 
13
+ #Automatically adjust contrast and color levels.
14
+ #GAE only.
11
15
  def i_am_feeling_lucky
12
16
  transform(ImagesServiceFactory.make_im_feeling_lucky)
13
17
  end
14
18
 
19
+ #--
15
20
  # Implementations of standard features
16
-
21
+ #++
22
+
17
23
  def flip_horizontally_impl
18
24
  transform(ImagesServiceFactory.make_horizontal_flip)
19
25
  end
@@ -1,3 +1,3 @@
1
1
  class ImageVoodoo
2
- VERSION = "0.7"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,75 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_voodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.7"
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 8
8
+ - 0
9
+ version: 0.8.0
5
10
  platform: ruby
6
11
  authors:
7
- - Thomas Enebo, Charles Nutter and JRuby contributors
12
+ - Thomas Enebo, Charles Nutter and JRuby contributors
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-11-05 00:00:00 -06:00
17
+ date: 2010-11-09 00:00:00 -08:00
13
18
  default_executable:
14
- dependencies: []
15
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rubyforge
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 0
31
+ - 4
32
+ version: 2.0.4
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 2
45
+ - 6
46
+ - 2
47
+ version: 2.6.2
48
+ type: :development
49
+ version_requirements: *id002
16
50
  description: Install this gem and require 'image_voodoo' to load the library.
17
51
  email: enebo@acm.org, headius@headius.com
18
52
  executables:
19
- - image_voodoo
53
+ - image_voodoo
20
54
  extensions: []
21
55
 
22
56
  extra_rdoc_files:
23
- - Manifest.txt
24
- - README.txt
25
- - LICENSE.txt
57
+ - Manifest.txt
58
+ - README.txt
59
+ - LICENSE.txt
26
60
  files:
27
- - bin/image_voodoo
28
- - Manifest.txt
29
- - Rakefile
30
- - README.txt
31
- - LICENSE.txt
32
- - lib/image_science.rb
33
- - lib/image_voodoo/awt.rb
34
- - lib/image_voodoo/gae.rb
35
- - lib/image_voodoo/version.rb
36
- - lib/image_voodoo.rb
37
- - samples/bench.rb
38
- - samples/checkerboard.jpg
39
- - samples/file_greyscale.rb
40
- - samples/file_thumbnail.rb
41
- - samples/file_view.rb
42
- - samples/in-memory.rb
43
- - test/pix.png
44
- - test/test_image_science.rb
61
+ - bin/image_voodoo
62
+ - Manifest.txt
63
+ - Rakefile
64
+ - README.txt
65
+ - LICENSE.txt
66
+ - lib/image_science.rb
67
+ - lib/image_voodoo.rb
68
+ - lib/image_voodoo/awt.rb
69
+ - lib/image_voodoo/gae.rb
70
+ - lib/image_voodoo/version.rb
71
+ - samples/bench.rb
72
+ - samples/checkerboard.jpg
73
+ - samples/file_greyscale.rb
74
+ - samples/file_thumbnail.rb
75
+ - samples/file_view.rb
76
+ - samples/in-memory.rb
77
+ - test/pix.png
78
+ - test/test_image_science.rb
45
79
  has_rdoc: true
46
80
  homepage: http://jruby-extras.rubyforge.org/image_voodoo
47
81
  licenses: []
48
82
 
49
83
  post_install_message:
50
84
  rdoc_options:
51
- - --main
52
- - README.txt
85
+ - --main
86
+ - README.txt
53
87
  require_paths:
54
- - lib
88
+ - lib
55
89
  required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
56
91
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: "0"
60
- version:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ segments:
95
+ - 0
96
+ version: "0"
61
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
62
99
  requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: "0"
66
- version:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ segments:
103
+ - 0
104
+ version: "0"
67
105
  requirements: []
68
106
 
69
107
  rubyforge_project: jruby-extras
70
- rubygems_version: 1.3.5
108
+ rubygems_version: 1.3.7
71
109
  signing_key:
72
110
  specification_version: 3
73
111
  summary: Image manipulation in JRuby with ImageScience compatible API
74
112
  test_files:
75
- - test/test_image_science.rb
113
+ - test/test_image_science.rb