[OpenJDK 2D-Dev]  RFR JDK-5109146: PNGMetadata Background color initialization from standard metadata is incomplete
krishna.addepalli at oracle.com
Wed May 9 06:21:03 UTC 2018
Here are my observations/questions:
1. I see that the fix is to update the bKGD_colorType for Background color child. However, don't you need to do the same thing for paletted images as well?
2. As for the test case, I'm not sure how ImageReaders and ImageWriters work.
I see that you query them from ImageIO, so the question is, do you need to get a new ImageReader/ImageWriter for each image read/write operation?
If so, then, there is a potential problem when you call VerifyNativeRGBValuesFromBKGDChunk() and VerifyStandardRGBValuesFromBKGDChunk() in succession, since each in turn calls writeAndReadMetaData() and the writer is disposed.
On the other hand, if querying for the reader/writer for once is enough, then you can initialize the image reader/writer in the static block itself, and then run the whole test.
From: Jayathirth D V
Sent: Wednesday, April 18, 2018 3:34 PM
Subject: RE: [OpenJDK 2D-Dev]  RFR JDK-5109146: PNGMetadata Background color initialization from standard metadata is incomplete
Since changes related to JDK-6574555 is pushed.
Please find new webrev which captures test case changes over JDK-6574555.
From: Jayathirth D V
Sent: Tuesday, April 17, 2018 3:34 PM
Subject: [OpenJDK 2D-Dev]  RFR JDK-5109146: PNGMetadata Background color initialization from standard metadata is incomplete
Please review the following fix in JDK11 :
Bug : https://bugs.openjdk.java.net/browse/JDK-5109146
Webrev : http://cr.openjdk.java.net/~jdv/5109146/webrev.00/
Issue: PNGMetadata.mergeStandardTree() function doesn't set proper bKGD colortype.
Solution: When bKGD R, G, B values are unique we need to store appropriate bKGD colortype in metadata.
Note : Test case which is present as part of review in JDK-6574555 is only updated to handle regression scenario for this bug also. Regression scenario between this bug and JDK-6574555 differ only in what type(native/standard) metadata we use to merge bKGD RGB values.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev