Reconstruct original 16-bit Raw pixel data from the HTML5 canvas -


if 16-bit single channel (gray-scale) raw pixel data losslessly encoded image format(e.g.png, webp , jpeg-2000 or jpeg-xr) , image rendered html5 canvas, there way retrieve original 16-bit raw pixel data canvas?

no.

when drawn canvas image uncompressed, , pixels data pre-multiplied , converted 24-bit data + 8-bit alpha channel (rgba).
in process image looses original, same color depth original image because of various rounding errors (see canvas fingerprinting.)

so lossless formats loosy on canvas.

if need raw data, you'll need write parser , treat directly images files arraybuffer.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -