image_voodoo 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05fad5e0d03bf3bb9b5e00e891cf42195a2da7e5
4
- data.tar.gz: 690d86a449b4ba579d1c1c75c3690a9ec6020934
3
+ metadata.gz: 709c3a00ec625b53da4d6d207acaa3f90e65bf2e
4
+ data.tar.gz: 5aacbf95ce98e716d1835e3f247be935e35ab8b9
5
5
  SHA512:
6
- metadata.gz: ca9c398db76f6a2c0fe1f85e072f18bae35d045d707d6ba7e0acb96c9fbe0c9687d9096b9958fb16bb7f221525b0ffcbdc6fb554f8edfb04b5b6a62cadd4d93e
7
- data.tar.gz: 72fa3952dd8f9e828cefdfbc5079ada1979b4be5a1ef65f758e37b82af8403e753464ad4504b825986fe76e8c4211d0f1193105650e654bb813469e9bf9ae26d
6
+ metadata.gz: 40c4daa327de23784c6b9c376057853049f5ac23a574a50a99e94cb12e5fdd2cbcc285e4578752fc00014425e900b289b6d0cdc154bca90ef9f9eb7fe748f4f3
7
+ data.tar.gz: 622bb1cdec6c00a93cf804a1abf12aa67da81e34d40fb179b819da7c6ef6a6f560d884f27337765175f5307341fb019a735a4bbe0e0c258ba56770d56831618b
@@ -271,6 +271,7 @@ class ImageVoodoo
271
271
  param = writer.default_write_param
272
272
  if param.can_write_compressed && @quality
273
273
  param.compression_mode = ImageWriteParam::MODE_EXPLICIT
274
+ param.compression_type ||= param.compression_types.first
274
275
  param.compression_quality = @quality
275
276
  end
276
277
 
@@ -1,3 +1,3 @@
1
1
  class ImageVoodoo
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  end
Binary file
@@ -142,7 +142,7 @@ class TestImageScience < Test::Unit::TestCase
142
142
  bytes_string = img.bytes('JPEG')
143
143
  image = ImageScience.with_bytes(bytes_string)
144
144
  assert_equal 'JPEG', image.format
145
- assert image.to_java.is_a?(java.awt.image.BufferedImage), "JAVA representation of image should be a BufferedImage instance"
145
+ assert_kind_of java.awt.image.BufferedImage, image.to_java
146
146
  end
147
147
  end
148
148
 
@@ -150,4 +150,22 @@ class TestImageScience < Test::Unit::TestCase
150
150
  image = ImageScience.with_bytes("some invalid image bytes")
151
151
  assert_equal nil, image.format
152
152
  end
153
+
154
+ def test_cmyk_jpeg_image_reading
155
+ assert_nothing_raised do
156
+ image = ImageScience.with_image('test/pix_cmyk.jpg')
157
+ assert_equal 'JPEG', image.format
158
+ assert_kind_of java.awt.image.BufferedImage, image.to_java
159
+ end
160
+ end
161
+
162
+ def test_saving_gif_with_explicit_quality
163
+ @tmppath = 'test/pix-tmp.gif'
164
+ ImageScience.with_image @path do |img|
165
+ new_img = img.quality(0.8)
166
+ assert new_img.save(@tmppath)
167
+ end
168
+
169
+ assert File.exists?(@tmppath)
170
+ end
153
171
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_voodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas E. Enebo, Charles Nutter, Nick Sieger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Image manipulation in JRuby with ImageScience compatible API
14
14
  email: tom.enebo@gmail.com
@@ -41,12 +41,13 @@ files:
41
41
  - samples/in-memory.rb
42
42
  - samples/lossy.rb
43
43
  - test/pix.png
44
+ - test/pix_cmyk.jpg
44
45
  - test/test_image_science.rb
45
46
  - vendor/CMYKDemo.jar
46
47
  homepage: http://github.com/jruby/image_voodoo
47
48
  licenses: []
48
49
  metadata: {}
49
- post_install_message:
50
+ post_install_message:
50
51
  rdoc_options: []
51
52
  require_paths:
52
53
  - lib
@@ -64,9 +65,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  requirements: []
65
66
  rubyforge_project: image_voodoo
66
67
  rubygems_version: 2.2.2
67
- signing_key:
68
+ signing_key:
68
69
  specification_version: 4
69
70
  summary: Image manipulation in JRuby with ImageScience compatible API
70
71
  test_files:
71
72
  - test/pix.png
73
+ - test/pix_cmyk.jpg
72
74
  - test/test_image_science.rb