Problem
Hi everyone i got a problem with my canvas generated with pixiJS library. I need to create a tool which allow to users to custom and improve image quality with brigtness, contrast, sharping etc. The probleme is that I work with big pictures (7000x3500px) and the picture is distorted after putting effects. In my company i got the problem with just a MAC. In others devices it works well.
Example of simple code
var canvas2 = document.createElement( "canvas" );
canvas2.width = 7000;
canvas2.height = 3500;
var image2 = new Image();
image2.src = "img2.jpg";
var ctx2 = canvas2.getContext( "2d" );
image2.addEventListener( "load", function() {
ctx2.drawImage( image2, 0, 0 );
var app = new PIXI.Application();
var texture = new PIXI.Texture.fromCanvas( canvas2 );
var sprite = new PIXI.Sprite( texture );
app.stage.addChild( sprite );
var color = new PIXI.filters.AdjustmentFilter();
sprite.filters = [color];
color.red = 1.5;
var exp = app.renderer.plugins.extract.canvas( sprite )
console.log( exp.toDataURL( "image/jpeg" ) );
} );
Results
I changed width and height.
Firstly (800pc / 400px) : good image.
Secondly (7000px/3500px) : distorted image