javascript - Read image and determine if its corrupt with the FileReader API -


is there way determine if jpeg file corrupt after reading via filereader api in javascript?

i'm thinking "libjpeg" does. provides warning messages if wrong jpeg file.

there libraries jpeg decoding in pure javascript.

e.g. https://github.com/notmasteryet/jpgjs (there others)

you can decode filereader fed data in javascript code , see if output sane.

depending of degree of corruption, cases want trap, should possible on client-side.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -