Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibGfx/WebPWriter: Do not write color index if only one channel varies #24503

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Jun 1, 2024

The benefit of the color indexing transform is to have only one
varying channel after it (the green channel, which after the
transform serves as index into the color table).

If there is only one varying channel before the transform, it's
not beneficial. (...except if there are <= 16 colors, then the
pixel bundling presumably still works.)


Small FIXME-fix after #24483.

The benefit of the color indexing transform is to have only one
varying channel after it (the green channel, which after the
transform serves as index into the color table).

If there is only one varying channel before the transform, it's
not beneficial. (...except if there are <= 16 colors, then the
pixel bundling presumably still works.)
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Jun 1, 2024
@nico
Copy link
Contributor Author

nico commented Jun 1, 2024

Red CI unrelated.

The color indexing transform shouldn't make single-channel images
larger (by needlessly writing a palette). If there <= 16 colors
in the single channel, it should make the image smaller.
@timschumi timschumi merged commit 3ca6dfb into SerenityOS:master Jun 1, 2024
11 of 12 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Jun 1, 2024
@nico nico deleted the webp-subtract-green branch June 1, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants