christoffer-rydberg commented on a change in pull request #55: Add support to
read multiple images from GIF
URL: https://github.com/apache/commons-imaging/pull/55#discussion_r341378065
##########
File path:
src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
##########
@@ -485,24 +495,35 @@ public Dimension getImageSize(final ByteSource
byteSource, final Map<String, Obj
if (bhi == null) {
throw new ImageReadException("GIF: Couldn't read Header");
}
-
- final ImageDescriptor id = (ImageDescriptor) findBlock(blocks.blocks,
- IMAGE_SEPARATOR);
- if (id == null) {
- throw new ImageReadException("GIF: Couldn't read ImageDescriptor");
- }
-
- // Prefer the size information in the ImageDescriptor; it is more
- // reliable
- // than the size information in the header.
- return new Dimension(id.imageWidth, id.imageHeight);
+
Review comment:
Thanks, I saw. Had some trailing spaces. Fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services