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_r340994486
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
 ##########
 @@ -492,17 +502,29 @@ public Dimension getImageSize(final ByteSource 
byteSource, final Map<String, Obj
             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.
 
 Review comment:
   Each image descriptor gives the dimensions of one image. So the old code was 
accurate with the width/height of the first image only. According to this [w3 
spec](https://www.w3.org/Graphics/GIF/spec-gif87.txt) the screen descriptor 
defines the "overall dimensions of the image space or logical screen required". 
As I understand it this is the width/height of all images combined (with their 
offsets applied). I can write a unit test to see if this is true for the test 
gifs.

----------------------------------------------------------------
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

Reply via email to