mirror of
https://github.com/lovell/sharp.git
synced 2025-07-14 12:50:12 +02:00
Tests: flatten to mid-grey before generating fingerprint
This commit is contained in:
parent
88a3919ce0
commit
11daa3b4d1
1
test/fixtures/index.js
vendored
1
test/fixtures/index.js
vendored
@ -13,6 +13,7 @@ const getPath = function (filename) {
|
|||||||
// Based on the dHash gradient method - see http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
|
// Based on the dHash gradient method - see http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
|
||||||
const fingerprint = function (image, callback) {
|
const fingerprint = function (image, callback) {
|
||||||
sharp(image)
|
sharp(image)
|
||||||
|
.flatten('gray')
|
||||||
.greyscale()
|
.greyscale()
|
||||||
.normalise()
|
.normalise()
|
||||||
.resize(9, 8, { fit: sharp.fit.fill })
|
.resize(9, 8, { fit: sharp.fit.fill })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user