--- old/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java 2018-04-10 11:26:56.724043831 +0530 +++ new/src/java.desktop/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java 2018-04-10 11:26:56.435899841 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2259,6 +2259,12 @@ return retVal; } + boolean hasTransparentColor() { + return tRNS_present && + (tRNS_colorType == PNGImageReader.PNG_COLOR_RGB || + tRNS_colorType == PNGImageReader.PNG_COLOR_GRAY); + } + // Reset all instance variables to their initial state public void reset() { IHDR_present = false; @@ -2294,3 +2300,4 @@ unknownChunkData = new ArrayList(); } } +