trim-canvas
trim-canvas copied to clipboard
Image quality regression after repeated usage
hi, I used this script in my app,
After erasing ended, all image returns with erased parts removed and then module takes canvas and returns canvas. However if you use it on same bitmap 5-6 times distinguishable quality regression takes place. But its not like pixelating, more like gaussian blur. I tried context.imageSmoothingEnabled = false
inside function with no luck.
Hmmm, thanks for bringing this up! I haven't a clue why that happened (haven't tested to see if it's a recurring issue, but I'd guess so) and I would think it's more to do with canvas
internals than this library's usage.
If you've found out why or find a fix in the future, feel free to make a PR or comment back here
Actually maybe this is caused by the getRGBA
function? It appears to use ImageData
correctly though, so probably not. Possibly affected by https://github.com/agilgur5/trim-canvas/pull/1 but that shouldn't have induced any blur-like regression :/