libis-format 0.9.21 → 0.9.22
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed9452c366ebd64b7c1816bd64cdf0db34d8da79
|
|
4
|
+
data.tar.gz: db6860f1a4d4448ba6b4355a3b6e84f75238648d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b50c3e2d3e33fab8274de6717ddde01112a99a7487b282b9a5be3178460532a3ec4bb004d883ec498f3b7315a8df104fe57c1242741049e80097bb2c9324805c
|
|
7
|
+
data.tar.gz: 9e73029ba7b308fc34d599ceb85554b2110581959118b15e6329013b501d06a0d02a75aeabbbd73cbd2aa4821c2c61499cc5bbfb2e0cc9de6ce796aa62501de4
|
|
@@ -14,12 +14,19 @@ module Libis
|
|
|
14
14
|
|
|
15
15
|
class ImageConverter < Libis::Format::Converter::Base
|
|
16
16
|
|
|
17
|
-
def self.input_types(
|
|
17
|
+
def self.input_types(_ = nil)
|
|
18
18
|
[:TIFF, :JPG, :PNG, :BMP, :GIF, :JP2, :PDF]
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def self.output_types(
|
|
22
|
-
|
|
21
|
+
def self.output_types(input_format = nil)
|
|
22
|
+
case input_format
|
|
23
|
+
when :JP2
|
|
24
|
+
[:JP2]
|
|
25
|
+
when *(input_types - [:JP2])
|
|
26
|
+
input_types - [:JP2]
|
|
27
|
+
else
|
|
28
|
+
[]
|
|
29
|
+
end
|
|
23
30
|
end
|
|
24
31
|
|
|
25
32
|
def initialize
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require_relative 'base'
|
|
4
|
-
require 'libis/format/identifier'
|
|
5
|
-
|
|
6
|
-
require 'mini_magick'
|
|
2
|
+
require 'libis-tools'
|
|
7
3
|
require 'fileutils'
|
|
4
|
+
require 'libis/format/config'
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
require_relative 'base'
|
|
11
7
|
module Libis
|
|
12
8
|
module Format
|
|
13
9
|
module Converter
|
|
14
10
|
|
|
15
11
|
class Jp2Converter < Libis::Format::Converter::Base
|
|
16
12
|
|
|
17
|
-
def self.input_types(
|
|
13
|
+
def self.input_types(_ = nil)
|
|
18
14
|
[:TIFF, :JPG, :PNG, :BMP, :GIF, :PDF]
|
|
19
15
|
end
|
|
20
16
|
|
|
@@ -102,8 +98,6 @@ module Libis
|
|
|
102
98
|
)
|
|
103
99
|
|
|
104
100
|
target
|
|
105
|
-
|
|
106
|
-
|
|
107
101
|
end
|
|
108
102
|
end
|
|
109
103
|
end
|
data/lib/libis/format/version.rb
CHANGED