Does ImageIO view implied anti-aliasing?

I replaced the internal ImageFetcher Java with my own implementation using ImageIO. Some of our softwareโ€™s image rendering tools that use these images now use smoothed, scaled images instead of not smoothing. The only change is the source of the image, which is now BufferedImages, not Toolkit-Images.

The question is, where is the difference? Which property makes images scale with anti-aliasing? I always thought that the key to fighting with an alias ONLY depends on the graphics that I draw, but this is clearly wrong.

By the way: unfortunately, I canโ€™t change the renderers.

+3
source share
2 answers

Well, there is one important difference: BufferedImages - RenderedImages, ToolkitImages - no. This can lead to inconsistent behavior in some cases, but does not seem to be a Java problem at all.

0
source

If ImageIO.read does any anti-aliasing, this is probably a platform-specific problem, as @Ichorus points out, since ImageIO.read does not indicate anything about the expected behavior for scaling or anti-aliasing.

What you can try are your tips for your Graphics2D context before releasing g.drawImage or similar.

http://bit.ly/7b6lvg <- Sun Java documentation on Graphics2D.setRenderingHint

+2
source

Source: https://habr.com/ru/post/1725955/


All Articles