imogen 0.5.0 → 0.5.1
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 +4 -4
- data/lib/imogen/iiif/tiles.rb +3 -2
- data/spec/unit/imogen_iiif_tiles_spec.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09c425bd9ab585fa2587f09034d1fde353bf0ba992681d5ebe0631faff1b6f6d'
|
|
4
|
+
data.tar.gz: 828b3d38469483aa9224c2fb2268eb9dfd2bec04e42a40c577f252b01f288d6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0eff43035b35e4ecb31cb341ef8152df76b1840c43fd042fc984b6786f2bc0c9b66e64d5801f65eba0da2dd903bc28fe7506cb027f0fb27701323a6e590ff42c
|
|
7
|
+
data.tar.gz: e649f55749ff213fad130d66a8429340d6268d83e10a26d49d3bdfbdf08fc7c9f1894b8e9cf5422408caf1657b48c6cab12dbdc3a68b0e65ce2168277c1190cd
|
data/lib/imogen/iiif/tiles.rb
CHANGED
|
@@ -43,7 +43,8 @@ module Imogen
|
|
|
43
43
|
raster_opts[:rotation].to_s,
|
|
44
44
|
"#{raster_opts[:quality]}.#{Imogen::Iiif::FORMATS[raster_opts[:format]]}"
|
|
45
45
|
)
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
yield(img, dest_path, raster_opts[:format], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
|
|
@@ -114,7 +115,7 @@ module Imogen
|
|
|
114
115
|
raster_opts[:rotation].to_s,
|
|
115
116
|
"#{raster_opts[:quality]}.#{Imogen::Iiif::FORMATS[raster_opts[:format]]}"
|
|
116
117
|
)
|
|
117
|
-
yield(img, dest_path, raster_opts[
|
|
118
|
+
yield(img, dest_path, raster_opts[:format], Imogen::Iiif.path_to_opts(dest_path, dest_dir))
|
|
118
119
|
|
|
119
120
|
row += 1
|
|
120
121
|
y += tile_height
|
|
@@ -70,7 +70,7 @@ describe Imogen::Iiif::Tiles, type: :unit do
|
|
|
70
70
|
64 => tile64
|
|
71
71
|
}.each do |tile_size, expected_tiles|
|
|
72
72
|
actual = []
|
|
73
|
-
described_class.for(@test_image, '', :
|
|
73
|
+
described_class.for(@test_image, '', :jpg, tile_size) do |img, dest_path, format, opts|
|
|
74
74
|
actual << dest_path
|
|
75
75
|
end
|
|
76
76
|
expect(actual).to eql(expected_tiles)
|
|
@@ -82,6 +82,17 @@ describe Imogen::Iiif::Tiles, type: :unit do
|
|
|
82
82
|
actual = []
|
|
83
83
|
described_class.for(@test_image, '', :png, 256) do |img, dest_path, format, opts|
|
|
84
84
|
actual << dest_path
|
|
85
|
+
expect(format).to eq(:png)
|
|
86
|
+
end
|
|
87
|
+
expect(actual).to eql(expected)
|
|
88
|
+
end
|
|
89
|
+
it 'should produce jpg when requested' do
|
|
90
|
+
expected = tile256
|
|
91
|
+
expected.uniq!
|
|
92
|
+
actual = []
|
|
93
|
+
described_class.for(@test_image, '', :jpg, 256) do |img, dest_path, format, opts|
|
|
94
|
+
actual << dest_path
|
|
95
|
+
expect(format).to eq(:jpg)
|
|
85
96
|
end
|
|
86
97
|
expect(actual).to eql(expected)
|
|
87
98
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: imogen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Armintor
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-07-20 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: ruby-vips
|