mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user