[OpenJDK 2D-Dev]  RFR: JDK-8164971: PNG metadata does not handle ImageCreationTime
Prahalad Kumar Narayanan
prahalad.kumar.narayanan at oracle.com
Tue Aug 29 06:10:45 UTC 2017
Thank you for your time in review.
It's a valid suggestion to include a "round trip" test case where we write a PNG file with "Creation Time" in text chunk and verify the same with a read operation.
This use case has been added to the existing test case and it passes with the fix.
The updated webrev link is as follows:
Kindly review at your convenience & share your feedback.
Thank you once again for your time
Have a good day
----- Original Message -----
From: Brian Burkhalter
Sent: Tuesday, August 29, 2017 4:05 AM
To: Prahalad Kumar Narayanan
Cc: Jayathirth D V; 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev]  RFR: JDK-8164971: PNG metadata does not handle ImageCreationTime
I think this looks OK. I wonder however whether it might not hurt to add a "round trip" sub-test which would write out the image containing the CreationTime and then read it back in and verify that the time was actually written to the image. I think this is optional so if you want to go ahead with the patch as-is that is fine.
On Aug 24, 2017, at 2:46 AM, Prahalad Kumar Narayanan <prahalad.kumar.narayanan at oracle.com> wrote:
I 've made the corrections as you have suggested.
. Spaces have been added around "-" sign in PNGImageReader
. All multi line comments have been corrected with verbiage starting in 2nd line.
On PNGImageWriter writing Creation Time in text chunks
. When writing the text chunks to the output stream, PNGImageWriter uses the data in the ArrayList(s) that correspond to different text chunks.
. By ensuring that every update to Standard/ Document/ ImageCreationTime is reflected on the ArrayList of the last decoded text chunk with Creation Time, we also ensure that Creation Time would be written to output by the PNGImageWriter. Hence no additional changes will be required in PNGImageWriter file.
The updated code can be reviewed at:
Kindly review the changes at your convenience & provide your feedback.
More information about the 2d-dev