Changeset 17827 in josm


Ignore:
Timestamp:
2021-04-26T20:12:34+02:00 (4 years ago)
Author:
simon04
Message:

see #20733 - ImageProvider: do not rescale non SVG images when already correctly sized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r17728 r17827  
    192192                if (baseImage == null) throw new AssertionError();
    193193                ImageIcon icon = new ImageIcon(baseImage);
     194                if (dim.width == icon.getIconWidth() && dim.height == icon.getIconHeight()) {
     195                    return icon;
     196                }
     197
    194198                img = resizeMode.createBufferedImage(dim, new Dimension(icon.getIconWidth(), icon.getIconHeight()),
    195199                        null, icon.getImage());
Note: See TracChangeset for help on using the changeset viewer.