imgry 0.1.4 → 0.1.5
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.
- data/lib/imgry.rb +12 -4
- data/lib/imgry/processor/java_adapter.rb +2 -2
- data/lib/imgry/version.rb +1 -1
- metadata +23 -23
data/lib/imgry.rb
CHANGED
@@ -27,11 +27,19 @@ module Imgry
|
|
27
27
|
@processor = processor
|
28
28
|
end
|
29
29
|
|
30
|
+
class Error < StandardError
|
31
|
+
def initialize(msg)
|
32
|
+
super("#{self.class} #{msg}")
|
33
|
+
# TODO... we can parse this out to be cleaner.. human readable
|
34
|
+
# .. or we add the messages to a constant for each thing or something..
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
30
38
|
|
31
|
-
class InvalidImageError <
|
32
|
-
class UnsupportedFormatError <
|
33
|
-
class FileUnreadableError <
|
34
|
-
class FileUnwritableError <
|
39
|
+
class InvalidImageError < Error; end
|
40
|
+
class UnsupportedFormatError < Error; end
|
41
|
+
class FileUnreadableError < Error; end
|
42
|
+
class FileUnwritableError < Error; end
|
35
43
|
end
|
36
44
|
|
37
45
|
Imagery = Imgry
|
@@ -14,8 +14,8 @@ module Imgry
|
|
14
14
|
java.lang.System.setProperty('sun.java2d.opengl', 'true')
|
15
15
|
|
16
16
|
def self.with_bytes(img_blob)
|
17
|
-
|
18
|
-
new(
|
17
|
+
img_blob = img_blob.to_java_bytes if img_blob.is_a?(String)
|
18
|
+
new(img_blob)
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.from_file(path)
|
data/lib/imgry/version.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imgry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.5
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Pressly
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
17
18
|
requirements:
|
18
19
|
- - ~>
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: '2.12'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
25
|
none: false
|
22
|
-
requirement: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.12'
|
27
|
-
none: false
|
28
|
-
prerelease: false
|
29
|
-
type: :development
|
30
30
|
description: Fast image resizing/cropping designed for JRuby with MRI support
|
31
31
|
email:
|
32
32
|
- info@pressly.com
|
@@ -34,22 +34,22 @@ executables: []
|
|
34
34
|
extensions: []
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
|
-
- lib/imgry.rb
|
38
37
|
- lib/imgry/geometry.rb
|
39
|
-
- lib/imgry/processor.rb
|
40
|
-
- lib/imgry/version.rb
|
41
38
|
- lib/imgry/processor/image_voodoo.rb
|
42
39
|
- lib/imgry/processor/img_scalr.rb
|
43
40
|
- lib/imgry/processor/java_adapter.rb
|
44
41
|
- lib/imgry/processor/mini_magick.rb
|
42
|
+
- lib/imgry/processor.rb
|
43
|
+
- lib/imgry/version.rb
|
44
|
+
- lib/imgry.rb
|
45
45
|
- lib/java/imgscalr-lib-4.2.jar
|
46
46
|
- README.md
|
47
|
-
- spec/imgry_spec.rb
|
48
|
-
- spec/spec_helper.rb
|
49
47
|
- spec/imgry/geometry_spec.rb
|
50
48
|
- spec/imgry/processor/image_voodoo_spec.rb
|
51
49
|
- spec/imgry/processor/img_scalr_spec.rb
|
52
50
|
- spec/imgry/processor/mini_magick_spec.rb
|
51
|
+
- spec/imgry_spec.rb
|
52
|
+
- spec/spec_helper.rb
|
53
53
|
- spec/support/335is.gif
|
54
54
|
- spec/support/335is.jpg
|
55
55
|
- spec/support/335is.png
|
@@ -60,36 +60,35 @@ files:
|
|
60
60
|
- spec/support/transparent_background_saved.png
|
61
61
|
homepage: http://github.com/nulayer/imgry
|
62
62
|
licenses: []
|
63
|
-
post_install_message:
|
63
|
+
post_install_message:
|
64
64
|
rdoc_options: []
|
65
65
|
require_paths:
|
66
66
|
- lib
|
67
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
68
69
|
requirements:
|
69
70
|
- - ! '>='
|
70
71
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
-
MA==
|
73
|
-
none: false
|
72
|
+
version: '0'
|
74
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 1.3.6
|
79
|
-
none: false
|
80
79
|
requirements: []
|
81
|
-
rubyforge_project:
|
80
|
+
rubyforge_project:
|
82
81
|
rubygems_version: 1.8.24
|
83
|
-
signing_key:
|
82
|
+
signing_key:
|
84
83
|
specification_version: 3
|
85
84
|
summary: Fast image resizing/cropping designed for JRuby with MRI support
|
86
85
|
test_files:
|
87
|
-
- spec/imgry_spec.rb
|
88
|
-
- spec/spec_helper.rb
|
89
86
|
- spec/imgry/geometry_spec.rb
|
90
87
|
- spec/imgry/processor/image_voodoo_spec.rb
|
91
88
|
- spec/imgry/processor/img_scalr_spec.rb
|
92
89
|
- spec/imgry/processor/mini_magick_spec.rb
|
90
|
+
- spec/imgry_spec.rb
|
91
|
+
- spec/spec_helper.rb
|
93
92
|
- spec/support/335is.gif
|
94
93
|
- spec/support/335is.jpg
|
95
94
|
- spec/support/335is.png
|
@@ -98,3 +97,4 @@ test_files:
|
|
98
97
|
- spec/support/mexico-cmyk.jpg
|
99
98
|
- spec/support/transparent_background.png
|
100
99
|
- spec/support/transparent_background_saved.png
|
100
|
+
has_rdoc:
|