[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] [9] RFR JDK-8160327: Support for thumbnails present in APP1 marker for JPEG
From: Philip Race <philip.race () oracle ! com>
Date: 2016-08-31 23:03:37
Message-ID: 57C76249.3000704 () oracle ! com
[Download RAW message or body]
imageCreationTime = LocalDateTime.parse(dateTime, formatter);
Seems like it may throw DateTimeParseException - a subtype of
RuntimeException
https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#parse-java.lang.CharSequence-java.time.format.DateTimeFormatter-
I think in the case of such malformed data we want to silently swallow it
rather than propagate to the caller.
164 // XXX Might want to set
JPEGImageReader$ThumbnailReadListener
165 // to track thumbnail reading progress.
XXX ?
int getThumbnailWidth(int index) {
187 if (getNumThumbnails() != 1 || index != 0) {
188 throw new IndexOutOfBoundsException();
189 }
190 return thumbnailWidth;
191 }
Would it not be more informative to include "index" in the exception ?
Other than that looks fine.
-phil.
On 8/29/16, 7:39 AM, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue: https://bugs.openjdk.java.net/browse/JDK-8160327
> Patch: http://cr.openjdk.java.net/~bpb/8160327/webrev.00/
>
> Add thumbnail and standard metadata Document/ImageCreationTime from the APP1 Exif \
> marker segment if present
> The code has been tested using JPEG-Exif images with compressed thumbnails from \
> Canon, Nikon, and Olympus cameras, and using a JPEG-Exif image with an uncompressed \
> thumbnail from a Sony camera.
> Thanks,
>
> Brian
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic