Wish for different image natures and resizes.
"Continuous" photographic or CG image kind typically :
- Need linear, cubic or other anti-aliasing algorithm .
- Upscale ok, but do not make sense to zoom a lot.
- Downscale ok, but do not make sense to shrink to icon-like.
Pixel-art or interface screenshot kind typically :
- Need nearest neighbor, or other edge-preserving algorithm.
- Upscale dirty at small factors, but are typically zoomed a lot.
- Downscale very badly.
- May have alternate sizes already provided.
It could be some meta-information we could add to media.
It could be guessed by default based on file type or some image analytic.
It could also be used in column resizing decision when a table does not fit.
Explicit syntax could be like :
{{:img.png?10x11}} default
{{:img.png?10X11}} anti-aliasing
{{:img.png?10xx11}} edge-preserving
{{:img.png?10x11@eagle}} use eagle algorithm
{{:img.png?~10x11}} approximate size desired, adjust if necessary for nicer output
Unfortunately browser support is limited :
http://entropymine.com/resamplescope/notes/browsers/
https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering