litiengine
litiengine copied to clipboard
Scaling images down looks horrible.
Describe the bug
Using Imaging.scale(...)
to downsize images results in aliased edges and looks terrible.
To Reproduce
Use Imaging.scale(...)
to scale an image to a smaller size.
Expected behavior
For HUD elements, I would expect the scaled images to stay crisp and without flaky edges. Therefore, we should introduce another overload for Imaging.scale(...)
that passes the AffineTransformOp
type as argument.
Currently, we only use AffineTransformOp.TYPE_NEAREST_NEIGHBOR
.
Screenshots
Left example is downscaled using imgscalr-lib with Method.ULTRA_QUALITY
, right example uses LITIENGINE's standard Imaging.scale()
(AffineTransformOp.TYPE_NEAREST_NEIGHBOR
).
The example above uses LITIENGINE's Imaging.scale()
, but with AffineTransformOp.TYPE_BILINEAR
The example above uses LITIENGINE's Imaging.scale()
, but with AffineTransformOp.TYPE_BICUBIC