I have KineticJS 5.1.0 studio on iPhone 5. Due to the size of the screen of the iPhone, my scene is limited to 320px x 320px. Image capture is 1280 pixels x 1280 pixels. I want to be able to process this image on stage without losing quality due to reduction.
Here is the original image (Big version: https://dl.dropboxusercontent.com/u/47067729/originalImage2.jpg ):

Here's what happens when I load an image into a scene:

The image looks very strange, it has many stripes inside, as you can see in the image.
When I apply a filter, the image looks as follows.

This is not what he should look at.
JsFiddle (http://jsfiddle.net/confile/qhm7dn09/),
console.clear();
var imageObj = new Image();
var img = null;
var saveBtn = document.getElementById("save");
var resultImage = document.getElementById("resultImage");
var original = document.getElementById("original");
var downloadLink = document.getElementById("DownloadLink");
Kinetic.pixelRatio = 4;
stage = new Kinetic.Stage({
container: 'container',
width: 320,
height: 320
});
layer = new Kinetic.Layer();
img = new Kinetic.Image({
x: 0,
y: 0,
image: new Image()
});
layer.add(img);
stage.add(layer);
imageObj.onload = function() {
var tmpWidth = Math.floor(imageObj.width /2);
var w = Math.min(tmpWidth, 320);
var h = imageObj.height * w / imageObj.width;
img.setImage(this);
img.setWidth(w);
img.setHeight(h);
img.cache();
img.filters([Kinetic.Filters.Shinny]);
layer.draw();
};
imageObj.crossOrigin = "anonymous";
var imageUrl = "https://dl.dropboxusercontent.com/u/47067729/originalImage2.jpg";
imageObj.src = imageUrl;
original.src = imageUrl;
saveBtn.onclick = function(evt) {
console.log("save");
var canvas = $(stage.getContent()).find('canvas').get(0);
console.log("canvas: "+canvas);
var dataURL = canvas.toDataURL('image/jpeg', 1.0);
resultImage.src = dataURL;
downloadLink.href = dataURL;
};
, , / ?
: /, , . . , , , . 320px x 320px 1280px x 1280px, hugh.