libis-format 0.9.21 → 0.9.22

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: ca0fa2347db2ac8e525a5f4d9a2e0dd5b6041c3e
4
- data.tar.gz: 4e35f07c555c7535acfd7529fd5cbd5d66d93013
3
+ metadata.gz: ed9452c366ebd64b7c1816bd64cdf0db34d8da79
4
+ data.tar.gz: db6860f1a4d4448ba6b4355a3b6e84f75238648d
5
5
  SHA512:
6
- metadata.gz: 5d3885c3601936d75e4acd3c229ed4157dd44b759632f8b65ea46edc180189d57892f0f0f42050170e269ae0386e9e6cdb0870071a684355d27160b174166be0
7
- data.tar.gz: d92986e11cb2d1e4b35f60781d81d4a6a1bc5c7aba1b950abfc9e01f3b862891e4d57c1a5e758681c40fbe98b548980a0825df42471b9061f801c4d4f61951bf
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(format = nil)
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(_ = nil)
22
- [:TIFF, :JPG, :PNG, :BMP, :GIF, :JP2, :PDF]
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
- MiniMagick.logger.level = ::Logger::ERROR
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(format = nil)
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
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Format
3
- VERSION = '0.9.21'
3
+ VERSION = '0.9.22'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.21
4
+ version: 0.9.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser