JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
1–10 of 14 posts
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#2Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#3Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#4This can be done in like five lines of Javascript. Why does this even rank on HN?
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#5This can be done in like five lines of Javascript. Why does this even rank on HN?
What's the minimum number of lines before code becomes notable enough for HN?
// 8 Lines not including sarcastic comments obviously.
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#6There should be a law that says: "one shall not use var in JavaScript code examples"
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#7This can be done in like five lines of Javascript. Why does this even rank on HN?
Image-conversion is the library I've used the most, since you can target file-size || quality:
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#8Earlier quoted context omitted.
What's the minimum number of lines before code becomes notable enough for HN?
7 can be acceptable in some cases, but just to be safe I suggest 8 lines. // 8 Lines not including sarcastic comments obviously.
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#9Oh wait. It's a redirect to StackOverflow?!
https://stackoverflow.com/questions/23945494/use-html5-to-re...
Re: JavaScript Image Compress Using HTML5 Canvas and File API Before Upload
#10Database hugged to death :( Oh wait. It's a redirect to StackOverflow?! https://stackoverflow.com/questions/23945494/use-html5-to-re...
There are far more knobs you can tune whereas the native browser conversion only has mimetype and quality (via toBlob: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasE...)