Marti2203 opened a new pull request, #575: URL: https://github.com/apache/commons-imaging/pull/575
Fixes [IMAGING-393](https://issues.apache.org/jira/browse/IMAGING-393). `PaletteFactory.countTransparentColors(BufferedImage)` and `countTrasparentColors(int[])` used `first = -1` as "none seen yet" and tested `first < 0`. An ARGB value with an alpha of 0x80 or more is negative, so those colors were never counted (0 instead of 1 or 2). This tracks "seen" with a boolean. `PaletteFactoryTest.testCountTransparentColorsHighAlpha` fails without the change and passes with it; `PaletteFactoryTest` and `mvn -B -DskipTests -DskipITs` pass. This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually. The patch and this description were prepared with AI assistance (Claude Code) and reviewed by me; the commit carries an `Assisted-By:` trailer. -- 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]
