easyimg_utils 0.7.2 → 0.7.3

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
  SHA256:
3
- metadata.gz: c09e7c063bbd8a5c1060c74338346317b3432f46e53a0e3cdc6e0d4a64553520
4
- data.tar.gz: 8d73c424b106e51dea74394557e601b8ea78bfca66fd43bf80a10088527ba726
3
+ metadata.gz: 2b1dfaea58127ef88f5b78e46e00146d925b9cc9e05c7c8836d9d934a9cb87b5
4
+ data.tar.gz: d54061b87a0864110935762bfcd8558552fdaf0e925b3446aa1c22667a8ef41f
5
5
  SHA512:
6
- metadata.gz: 602af329751d96be2d89a4b6487d35d9c1920a4e56fb8d5330014e8e924b0edb44db1f74bd926224bcf3ee62435cba1b3b209ccea1f2301b0618a299534702b9
7
- data.tar.gz: abd50555f42ad809647180e58325578951b653f545fc7411c8b58e3132625ff90e82666509d1933ecf75d48409437b27dad9718fa60a4183c4d0174bc85e0fa5
6
+ metadata.gz: c66d8a62d782f4a1535df8351984c05701c6bfb0868cc42c266983054de86b70dc1238888108aa0492bd689d27b3485058fee7c1fe57175c495bc4bcad884c92
7
+ data.tar.gz: c1ddf021ed6e85154dc13d3b1dbcc59c47d8bac8066acbd8502d5f4704aa7296b3d713e0b9171c796e6bbe4e4530684d1e3c8d1bfe83c73aac055535cb6e6304
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/easyimg_utils.rb CHANGED
@@ -195,7 +195,8 @@ class EasyImgUtils
195
195
 
196
196
  # find the top y
197
197
  box = found.max_by {|x, y, width, height| y}
198
- box[1]
198
+ y, height = box.values_at 1, 3
199
+ y - (height / 2)
199
200
 
200
201
  else
201
202
 
@@ -612,7 +613,13 @@ class EasyImgUtils
612
613
  end
613
614
 
614
615
  a2 = a.map(&:sum)
615
- a2.index(a2.max) + 1
616
+ puts 'a2: ' + a2.inspect if @debug
617
+ #a2.index(a2.max) + 1
618
+ # attempt to detect the 1st occurrence of contrast
619
+ r = a2.detect {|x| x > 600}
620
+ # otherwise select any occurrence of high contrast
621
+ r = a2.max unless r
622
+ a2.index(r) + 1
616
623
 
617
624
  end
618
625
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easyimg_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  KY48n99T12IOioQ4ghCO1L/UAg2taLOcZbMv4WpV1p9bXKhnrow81zeogZjjiNGS
36
36
  OmTAjCfyGFPC/1eXnSV5Smv8
37
37
  -----END CERTIFICATE-----
38
- date: 2021-03-23 00:00:00.000000000 Z
38
+ date: 2021-03-24 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rmagick
metadata.gz.sig CHANGED
Binary file