We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4858a20 + b00090f commit 818c00eCopy full SHA for 818c00e
1 file changed
src/color-thief.js
@@ -31,8 +31,8 @@ import core from './core.js';
31
const CanvasImage = function (image) {
32
this.canvas = document.createElement('canvas');
33
this.context = this.canvas.getContext('2d');
34
- this.width = this.canvas.width = image.width;
35
- this.height = this.canvas.height = image.height;
+ this.width = this.canvas.width = image.naturalWidth;
+ this.height = this.canvas.height = image.naturalHeight;
36
this.context.drawImage(image, 0, 0, this.width, this.height);
37
};
38
0 commit comments