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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73ec3cad8fd74c5eef699cb7c2251077a667c6c0
4
- data.tar.gz: 925b66f53a63671a6b6985a37e7224d9e1b399dc
3
+ metadata.gz: 276ae83cf5882e8d61e4c45ade9e14a7e240b65a
4
+ data.tar.gz: a02324864794aeaf24281e266e218c3ec865f3be
5
5
  SHA512:
6
- metadata.gz: 8058297adddc0c433c4fce7f1a6e61a345f83801f3e6a739f90231bf289a02665b799e95e997cd3e3c3af327474c2ced3f341770b79423ef9018eb0411998f4a
7
- data.tar.gz: 0466d9ee38940e67e768336c9f216710f9e721d836cb92901a218b506f7bfc4e109e718684bd3097350530eab31e34cca234bc1ab0a168f323c9490525086506
6
+ metadata.gz: b308138a0c22a1c6d1b873573097cb6f8c918fcad538dc2b4d8a6d995232198f0a11562684bd51c1e1916b590299b93a4c63103eec82205aad6a0f66f1e6338f
7
+ data.tar.gz: ba547c330d1b1a43d89149507748ff70a076ac8101e8da750bf7d65a140ec2bb48fa5a5e5166cdf780666c42b0306f800e364f7e753cdb45cdec5aa839995688
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "dhash-vips"
3
- spec.version = "0.0.5.1"
3
+ spec.version = "0.0.6.0"
4
4
  spec.author = "Victor Maslov"
5
5
  spec.email = "nakilon@gmail.com"
6
6
  spec.summary = "dHash and IDHash powered by Vips"
@@ -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.5.1
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-05 00:00:00.000000000 Z
11
+ date: 2018-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-vips