trim-canvas icon indicating copy to clipboard operation
trim-canvas copied to clipboard

Image quality regression after repeated usage

Open malipetek opened this issue 7 years ago • 2 comments

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.

malipetek avatar Apr 06 '17 21:04 malipetek

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

agilgur5 avatar May 25 '17 02:05 agilgur5

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 :/

agilgur5 avatar May 25 '17 05:05 agilgur5