In my Swing application, since I migrated to Java 11, all my icons are bigger (with an unly antilias):
The icons are loaded basically this way:
BufferedInputStream stream = new BufferedInputStream(getApplicationRessource(pathToIcon));
int count = 0;
byte buf[] = new byte[MAX_IMAGE_SIZE];
try {
count = stream.read(buf);
stream.close();
} catch (IOException ieo) {
logger.error("Reading icon file \"" + p + "\"", ieo);
}
icon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(buf));
How to improve this ? By either preventing this resize or providing icons alternates ?