Re:Image Scaling Attacks
by NohatCoder on Thursday October 29, 2020 @04:23AM
(#24928337)
It is a very common, and often overlooked issue in image processing. Bilinear is widely used, and not particularly good. For large factor downscaling it is reminiscent of nearest pixel.
[ Parent
| on HN ]
> It is a very common (...)
Bilinear interpolation is perfectly acceptable for zooming-in an image (making it larger by adding new pixel values). If you want to zoom-out, you have can still use bilinear interpolation, but of course you have to filter the image data beforehand to avoid aliasing.
Re:Image Scaling Attacks
by NohatCoder on Thursday October 29, 2020 @11:53AM
(#24931819)
Most often scaling and filtering is an integrated process, when one says bilinear it is usually implied that it is combined with nothing else.
Indeed. If you filter the image data, you should _not_ do bilinear on top of that, since bilinear is a box filter, so you'd soften the image for no good reason.
You still need some kind of interpolation if the zoom factor is non-integer, and bilinear is a good choice in that case.