Use different resize filters for shrinking and enlarging
Use different resize filters for shrinking and enlarging

Basic Lanczos is a bit soft for both shrinking and enlarging
Sharp variant fares significanlty better when shrinking, but
has even more ringing than basic, which is especially visibie
when enlarging high-contrast images.
To not have to deal with the problem use Mitchell-Netravali
filter for enlarging instead as it is a reasonable compromise
between artifacting and sharpness with little distortion.

Possible future improvements: factor bits per color and contrast
when selecting resize filter

pressly/imgry,pressly/imgry