Hacker News new | ask | show | jobs
by dmitrygr 2981 days ago
png would be huge (since it is lossless) and jpg would incur double compression (source jpg and re-compressed from canvas) losing quality.
1 comments

Is there any solution other than those 2 options?

Any resizing of a jpg to another jpg is going to incur double compression isn't it? Sure there are ways of mitigating it using various sampling and resizing algorithms, but it's not going to be perfect, and there is no "one-size-fits-all" best algorithm.

What would a "browser API" provide that you can't already get with canvas?The only thing I can think of is customizable resize algorithms, but I'd rather have the option to change that for a canvas, rather than a specific "resize this image API".