You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an issue when using megapix-image.js on some transparent PNG's.
The issue is described in detail here: dropzone/dropzone#813
I managed to find and fix the problem, it's a 1 character fix.
In the detectVerticalSquash function, change this:
var data = ctx.getImageData(0, 0, 1, ih).data;
to this:
var data = ctx.getImageData(1, 0, 1, ih).data;
That's all. The library will work as before, and the problem with transparent PNG's is now fixed.
The text was updated successfully, but these errors were encountered:
in my case as well detectVerticalSquash function is called from renderImageToCanvas() method
i fixed it by commenting out some code
var alpha = data[(py - 1) * 4 + 3];
//if (alpha === 0) { //that fixes issue when it cant save png with transparent screen
// ey = py;
//} else {
sy = py;
//}
didnt find any bad influence yet but needs more testing :)
There's an issue when using megapix-image.js on some transparent PNG's.
The issue is described in detail here: dropzone/dropzone#813
I managed to find and fix the problem, it's a 1 character fix.
In the detectVerticalSquash function, change this:
to this:
That's all. The library will work as before, and the problem with transparent PNG's is now fixed.
The text was updated successfully, but these errors were encountered: