From 6829960facf8ef7813a98f0a09213340d785a6a9 Mon Sep 17 00:00:00 2001 From: Roberto Sebestyen Date: Wed, 4 Nov 2020 02:57:43 -0500 Subject: [PATCH] fix: update dependenvy csharp and fix errors --- index.js | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 8de0ef7..a3440a9 100644 --- a/index.js +++ b/index.js @@ -17,8 +17,7 @@ module.exports = function(path, callback, hashSize) { // Covert to small gray image var promise = sharp(path) .grayscale() - .resize(width, height) - .ignoreAspectRatio() + .resize(width, height, {fit:'fill'}) .raw() .toBuffer() .then(function(pixels) { diff --git a/package.json b/package.json index 8160626..3933ad2 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "license": "MIT", "dependencies": { - "sharp": "0.20.8" + "sharp": "^0.26.2" }, "devDependencies": { "mocha": "5",