litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Scaling images down looks horrible.

Open nightm4re94 opened this issue 1 year ago • 0 comments

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 image Left example is downscaled using imgscalr-lib with Method.ULTRA_QUALITY, right example uses LITIENGINE's standard Imaging.scale() (AffineTransformOp.TYPE_NEAREST_NEIGHBOR). image The example above uses LITIENGINE's Imaging.scale(), but with AffineTransformOp.TYPE_BILINEAR image The example above uses LITIENGINE's Imaging.scale(), but with AffineTransformOp.TYPE_BICUBIC

nightm4re94 avatar Sep 17 '22 21:09 nightm4re94