dhash-vips 0.0.5.1 → 0.0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dhash-vips.gemspec +1 -1
- data/lib/dhash-vips.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 276ae83cf5882e8d61e4c45ade9e14a7e240b65a
|
4
|
+
data.tar.gz: a02324864794aeaf24281e266e218c3ec865f3be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b308138a0c22a1c6d1b873573097cb6f8c918fcad538dc2b4d8a6d995232198f0a11562684bd51c1e1916b590299b93a4c63103eec82205aad6a0f66f1e6338f
|
7
|
+
data.tar.gz: ba547c330d1b1a43d89149507748ff70a076ac8101e8da750bf7d65a140ec2bb48fa5a5e5166cdf780666c42b0306f800e364f7e753cdb45cdec5aa839995688
|
data/dhash-vips.gemspec
CHANGED
data/lib/dhash-vips.rb
CHANGED
@@ -66,7 +66,7 @@ module DHashVips
|
|
66
66
|
def fingerprint filename, power = 3
|
67
67
|
size = 2 ** power
|
68
68
|
image = Vips::Image.new_from_file filename
|
69
|
-
image = image.resize(size.fdiv(image.width), vscale: size.fdiv(image.height)).colourspace("b-w")
|
69
|
+
image = image.resize(size.fdiv(image.width), vscale: size.fdiv(image.height)).colourspace("b-w").flatten
|
70
70
|
|
71
71
|
array = image.to_a.map &:flatten
|
72
72
|
d1, i1, d2, i2 = [array, array.transpose].flat_map do |a|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dhash-vips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Maslov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-vips
|