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

Fix compression quality for image file formats like jpeg. #50

Merged
merged 1 commit into from
May 24, 2024

Conversation

acolwell
Copy link
Collaborator

This fixes an issue introduced by #31 that causes the compression quality to be ignored for formats with default compression like JPEG files. In the case of these files, the compression string was not being set and so the line that was appending the quality was actually triggering behavior that caused the quality value to be ignored. This in turn started causing the Natron-Tests to start failing because the JPEG writer, used in these tests, was not honoring the requested quality value.

The fix here simply specifies a valid base compression string for these formats so that when the quality is appended, the compression/codec part of the string is not empty. This avoids triggering logic in OIIO that ignores the quality values for empty compression/codec strings.

This fixes an issue introduced by NatronGitHub#31
that causes the compression quality to be ignored for formats with
default compression like JPEG files. In the case of these files,
the compression string was not being set and so the line that was
appending the quality was actually triggering behavior that caused
the quality value to be ignored. This in turn started causing the
Natron-Tests to start failing because the JPEG writer used in these
tests was not honoring the requested quality value.

The fix here is simply to specify a valid base compression string
for these formats so that when the quality is appended, the
compression/codec part of the string is not empty. This avoids
triggering logic in OIIO that ignores the quality values for
empty compression/codec strings.
@acolwell
Copy link
Collaborator Author

I've tested this with Natron & successfully run Natron-Tests on Windows. Without these changes Natron-Tests fails most of the test cases. With these changes Natron-Tests on Windows pass all the same tests that passed in the 2.5.0 release.

@acolwell acolwell merged commit c05d785 into NatronGitHub:master May 24, 2024
2 checks passed
@acolwell acolwell deleted the fix_compression_quality branch May 24, 2024 15:32
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.

2 participants