Changeset 7595 in josm for trunk/src/org


Ignore:
Timestamp:
2014-10-04T13:54:18+02:00 (5 years ago)
Author:
stoecker
Message:

see #10479 - fix transparency also for 'data:' loading mode

File:
1 edited

Legend:

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

    r7499 r7595  
    585585                } else {
    586586                    try {
    587                         return new ImageResource(read(new ByteArrayInputStream(bytes), false, false));
     587                        // See #10479: for PNG files, always enforce transparency to be sure tNRS chunk is used even not in paletted mode
     588                        // This can be removed if someday Oracle fixes https://bugs.openjdk.java.net/browse/JDK-6788458
     589                        // hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/828c4fedd29f/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java#l656
     590                        return new ImageResource(read(new ByteArrayInputStream(bytes), false, true));
    588591                    } catch (IOException e) {
    589592                        Main.warn("IOException while reading image: "+e.getMessage());
Note: See TracChangeset for help on using the changeset viewer.