[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] [10] RFR: JDK-8164971: PNG metadata does not handle ImageCreationTime
From:       Prahalad Kumar Narayanan <prahalad.kumar.narayanan () oracle ! com>
Date:       2017-04-22 11:02:54
Message-ID: 89230e11-6102-4468-9356-ca6cc7ba536a () default
[Download RAW message or body]

Hello Everyone

Good day to you.

Request your time in reviewing a fix for the bug
. JDK-8164971    PNG metadata does not handle ImageCreationTime

Root Cause:
. First, the PNGImageReader 's logic skips parsing of 'any' chunk once IDAT is found.
. Hence, if the ancilliary text chunks appear after IDAT chunk, they are not \
                processed at all.
. Second, the parsing of text chunks does not check for 'Creation Time' keyword.
. As a result the image creation time is never retrieved from .png image. 
. The converse is true as well- While writing a png image, the creation time is not \
written to text chunk

Details on the Fix:
. PNGImageReader
    . Logic has been fixed to continue parsing chunks until IEND chunk is found
    . Methods that process text chunks now check for the presence of 'Creation Time' \
                and retrieve the time information.
. PNGMetadata: 
    . New methods and variables to support image creation time in metadata.
    . Proper use of DateTimeFormatter.RFC_1123_DATE_TIME to decode time from text \
                chunk and encode time to text as well.
    . Changes to existing methods (that allow node retrieval & merge) for reading and \
                updating creation time.
. Test Case & Test Image
    . The test case- PngCreationTimeTest, checks the following use-cases
        . Decoding creation time from duke.png 's text chunk. 
            . I created the image using gimp and added text chunk programmatically \
                with Creation Time in it
        . Updating the image creation time using- mergeTree (nativeTree) and \
                inspecting same value in standard Document node
        . Updating the image creation time using- mergeTree (standardTree) and \
inspecting same value in native tree's text entry.

Other Details:
. The changes were tested with Jtreg and JCK suites
. No regressions were seen.

Kindly review the changes at your convenience and provide your suggestions.

Review Link:
http://cr.openjdk.java.net/~pnarayanan/8164971/webrev.00/

Thank you for your time in review
Have a good day


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic