imogen 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/imogen/iiif.rb +5 -5
- data/lib/imogen/zoomable.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1910c699380fcfbe8d180baf1c7ef25bbf521eba
|
4
|
+
data.tar.gz: 0ff96a7186b1265d68cfe02fded732efe37daa14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89d7cccae25fe76829cee9e1a73877fe8637963723ec6c4b48659956bfb61b655e383daefa23e1b2e930ee88e60af80adf52068d6d281e2e845ccf31d0dbcc10
|
7
|
+
data.tar.gz: be16bfdbd8fe83c64c0a6dabfc759e1af3a986aed72428f50cf62bb8c622a06b69db1bcbd49857fea375228f616b5d7d6e8f019083ac515ac1dcda3f7f2284eb
|
data/lib/imogen/iiif.rb
CHANGED
@@ -10,7 +10,7 @@ module Imogen
|
|
10
10
|
@width = src.width
|
11
11
|
@height = src.height
|
12
12
|
else
|
13
|
-
raise "#{src.class.name} does not report width and height"
|
13
|
+
raise "#{src.class.name} does not report width and height"
|
14
14
|
end
|
15
15
|
end
|
16
16
|
def max(x,y)
|
@@ -43,8 +43,8 @@ module Imogen
|
|
43
43
|
autoload :Rotation, 'imogen/iiif/rotation'
|
44
44
|
autoload :Tiles, 'imogen/iiif/tiles'
|
45
45
|
|
46
|
-
FORMATS = {jpeg: 'jpg', jpg: 'jpg', png: 'png'}
|
47
|
-
EXTENSIONS = {'jpg' => :jpeg, 'png' => :png}
|
46
|
+
FORMATS = {jpeg: 'jpg', jpg: 'jpg', png: 'png', jp2: 'jp2'}
|
47
|
+
EXTENSIONS = {'jpg' => :jpeg, 'png' => :png, 'jp2' => :jp2}
|
48
48
|
def self.convert(img, dest_path, format=nil, opts={})
|
49
49
|
format ||= opts.fetch(:format,:jpeg)
|
50
50
|
format = format.to_sym
|
@@ -56,9 +56,9 @@ module Imogen
|
|
56
56
|
dst = FreeImage::File.new(dest_path)
|
57
57
|
format = :jpeg if format == :jpg
|
58
58
|
if (img.color_type == :rgb)
|
59
|
-
quality.convert_to_24bits {|result| dst.save(result, format)}
|
59
|
+
quality.convert_to_24bits {|result| dst.save(result, format, (format == :jp2 ? 8 : 0))}
|
60
60
|
else
|
61
|
-
quality.convert_to_8bits {|result| dst.save(result, format)}
|
61
|
+
quality.convert_to_8bits {|result| dst.save(result, format, (format == :jp2 ? 8 : 0))}
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
data/lib/imogen/zoomable.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imogen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Armintor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-opencv
|
@@ -80,8 +80,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.4.3
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: derivative generation via FreeImage and smart square thumbnail via OpenCV
|
87
87
|
test_files: []
|
88
|
+
has_rdoc:
|