Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1651 : This is fixed by updating process.cpp. The check for whether a color spec is opaque was prematurely ending the
for
loop, a bug which does not exist in the Rust port.Fixes #1656 : This is fixed by updating rgba.cpp. The
Rgba::grayIndex
method returns a grayscale index for a color where red=green=blue, and was always in the half-open range [0, nbColorsPerPal). However, this was a mistake, since images with transparency would be using index 0 for the transparent color, and would have one fewer grayscale index available. The indexes are now in [1, nbColorsPerPal) when transparent pixels exist. (Note thatmaxOpaqueColors()
is justnbColorsPerPal - options.hasTransparentPixels
, so this logic now matches that.)Test cases now verify that neither of these bugs occurs any more.