Skip to content

Shift 16-bit output down to 8-bit when unsupported by saver #4574

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

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

kleisauke
Copy link
Member

@kleisauke kleisauke commented Jun 16, 2025

Resolves: #4568.

@kleisauke kleisauke marked this pull request as ready for review June 16, 2025 14:20
Comment on lines +1651 to +1652
!vips_band_format_is8bit(in->BandFmt) &&
vips_band_format_is8bit(format[in->BandFmt]);
Copy link
Member Author

@kleisauke kleisauke Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: to handle 8-bit to 16-bit promotion automatically, we could perhaps adjust this to:

Suggested change
!vips_band_format_is8bit(in->BandFmt) &&
vips_band_format_is8bit(format[in->BandFmt]);
vips_band_format_is8bit(in->BandFmt) !=
vips_band_format_is8bit(format[in->BandFmt]);

But I'm not sure if that is wanted.

@jcupitt jcupitt merged commit 163b542 into libvips:master Jun 18, 2025
6 checks passed
@kleisauke kleisauke deleted the issue-4568 branch June 18, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression with v8.17: PNG to JPEG conversion with DisplayP3 profile
2 participants