jvdvegt commented on PR #294:
URL: https://github.com/apache/commons-imaging/pull/294#issuecomment-1560610451

   @garydgregory Thanks, I'm on it.
   
   While writing a test, I noticed a potential bug in PngImageParser: it only 
sets 'usesPalette' when there are *more than one* palette (see 
https://github.com/apache/commons-imaging/blob/a6ccaa76fdf1627a402eb7a2b965e457a7733968/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java#L500
 ). That contradicts the check in that same file in 'getBufferedImage': 
https://github.com/apache/commons-imaging/blob/a6ccaa76fdf1627a402eb7a2b965e457a7733968/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java#L180
   I guess a PNG file can at most contain one palette, so the check on line 500 
should be for 'isEmpty'.
   
   Shall I fix that in my PR as well, or does it need a separate ticket?


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to