imogen 0.2.1 → 0.2.2
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/region.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b23125bf531a9a524f745c2ff9ffed4e3bd2e1aedf26dbdcd07434c0df9bbc0
|
4
|
+
data.tar.gz: 70b706da9db53e41b691eda24c70b8211cce3073cd99eae77a4045dad7dd0bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa4d10b1e6aa9a00b72d73daa4796b2ffcd72bde1bfcb8dc36443bfc3f8d82d72a86abff0e1a4f8e6150d17b959c5670bc6868e83a6a40906b40b56fa1e24786
|
7
|
+
data.tar.gz: f5e43a5c25d37b0b99b0578216169d0cb0deabc5598c46bd21f50cbc546ac38250f3b658609d34751006696c10652399453a2537c12d72e710a515cafa7c5145
|
data/lib/imogen/iiif/region.rb
CHANGED
@@ -63,7 +63,7 @@ class Region < Transform
|
|
63
63
|
crop_scale = middle_dims.min
|
64
64
|
smart_crop_opts = {interesting: (squarish?(img) ? :centre : :entropy)}.merge(opts)
|
65
65
|
window = img.extract_area(x_offset, y_offset, middle_dims[0], middle_dims[1])
|
66
|
-
smartcrop = window.smartcrop(crop_scale, crop_scale, smart_crop_opts)
|
66
|
+
smartcrop = window.smartcrop(crop_scale, crop_scale, **smart_crop_opts)
|
67
67
|
# Vips counts with negative offsets from left and top
|
68
68
|
yield smartcrop.thumbnail_image(scale, height: scale)
|
69
69
|
end
|
@@ -76,7 +76,7 @@ class Region < Transform
|
|
76
76
|
crop_scale = middle_dims.min
|
77
77
|
smart_crop_opts = {interesting: (squarish?(img) ? :centre : :entropy)}.merge(opts)
|
78
78
|
window = img.extract_area(x_offset, y_offset, middle_dims[0], middle_dims[1])
|
79
|
-
smartcrop = window.smartcrop(crop_scale, crop_scale, smart_crop_opts)
|
79
|
+
smartcrop = window.smartcrop(crop_scale, crop_scale, **smart_crop_opts)
|
80
80
|
# Vips counts with negative offsets from left and top
|
81
81
|
left = (window.xoffset + smartcrop.xoffset)*-1
|
82
82
|
top = (window.yoffset + smartcrop.yoffset)*-1
|
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.2.
|
4
|
+
version: 0.2.2
|
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:
|
12
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-vips
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.
|
99
|
+
rubygems_version: 3.2.32
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: IIIF image derivative generation helpers for Vips
|