简体   繁体   中英

HTML5 File Reader API - image quality

hey i have this simple piece of code to read image from input file in a form:

 var reader = new FileReader();
        reader.onload = fileOnload;
        reader.readAsDataURL(file);

then i send the file binary via ajax, but when it comes an image and i save it the image quality is little bit lost, is there any way to specify in html5 quality of the image while reading that ?

Or it's only a server side problem?

The File Reader API doesn't modify the files. If the quality is being changed it is because you are modifying the file on the server (instead of saving it directly).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM