3 ms·
Ah, but they didn't say they used nearest-neighbor when scaling it back down. This gives a (theoretically) better result when you want to scale up by a non-inte
by kmill 4y ago
Ah, but they didn't say they used nearest-neighbor when scaling it back down. This gives a (theoretically) better result when you want to scale up by a non-integer factor. (If it ends up just being an integer factor then there's no need to scale things back down.)
This feels similar to how you can generate high-quality square waves at frequencies that don't evenly divide the sampling rate. You generate it at a higher sampling rate, band limit it to the Nyquist frequency of the destination, then downsample. Otherwise there is aliasing phenomena that gives unwanted audible artifacts. For nearest-neighbor resized images, I suppose that would just appear as pixels of varying sizes, which is not nice to look at. Scaling it down antialiases the pixel so they optically look the same size.
- 3-cheese-sundae 4y agoGreat information, thanks. That's the sort of depth I'd have liked to see in the original article.