Fix image filtering on retina screens.

Make sure you get the same pixel count in Safari/Chrome/FF - it should match
the pixel count of the image.
This commit is contained in:
Adam Wróbel
2013-06-06 13:38:12 -07:00
parent 8a5ad235bd
commit 88d4e768d0

View File

@@ -125,15 +125,16 @@
}
else {
filterCanvas = this.filterCanvas = new Kinetic.SceneCanvas({
width: width,
height: height
width: width,
height: height,
pixelRatio: 1
});
}
context = filterCanvas.getContext();
try {
this._drawImage(context, [image, 0, 0, width, height]);
this._drawImage(context, [image, 0, 0, filterCanvas.getWidth(), filterCanvas.getHeight()]);
imageData = context.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());
filter.call(this, imageData);
context.putImageData(imageData, 0, 0);