From ce86c0470c0117e611c20200cce0b54008b2c51e Mon Sep 17 00:00:00 2001 From: aggrosoft Date: Wed, 25 Jul 2012 13:24:45 +0300 Subject: [PATCH] Fixing broken size of scaled images Size of original image will be taken into account where the scaled size should be used when calling applyFilter. This fixes this. --- src/image.class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image.class.js b/src/image.class.js index db0ba7ad..c4de32bd 100644 --- a/src/image.class.js +++ b/src/image.class.js @@ -225,7 +225,7 @@ canvasEl.width = imgEl.width; canvasEl.height = imgEl.height; - canvasEl.getContext('2d').drawImage(imgEl, 0, 0); + canvasEl.getContext('2d').drawImage(imgEl, 0, 0, imgEl.width, imgEl.height); this.filters.forEach(function(filter) { filter && filter.applyTo(canvasEl);