Kineticjs - Filter + Crop
(I use Kinetic 4.6.0)
Is it a bug ? When y apply a crop on an image, all is good, like this :
image with crop But if I use a filter, there is the result : image with
crop + filter Proportions are not good. All the image is compress for
entering in width and height of the crop.
Some ideas ?
My code for crop :
this.imageFond = new Kinetic.Image({
image : this.imageObj,
//filter : Kinetic.Filters.Blur,
//filterRadius : 20
});
this.imageFond.setCrop([50,50,750,1100]);
this.imageFond.setWidth(750);
this.imageFond.setHeight(1100);
this.layer.add(this.imageFond);
this.layer.batchDraw();
My code for crop + filter :
this.imageFond = new Kinetic.Image({
image : this.imageObj,
filter : Kinetic.Filters.Blur,
filterRadius : 20
});
this.imageFond.setCrop([50,50,750,1100]);
this.imageFond.setWidth(750);
this.imageFond.setHeight(1100);
this.layer.add(this.imageFond);
this.layer.batchDraw();
No comments:
Post a Comment