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

oiiotool: Better channel name logic when combining images #1827

Merged
merged 1 commit into from
Dec 18, 2017

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 13, 2017

Interesting edge case I came across:

oiiotool rgb.exr rgba.exr -add -o out.exr

The logic was that the result had 4 channels (the greater of the two
inputs), but the channel names were just copied straight from the first
input, and it was (coincidentally, in this example) the one with fewer
channels, so it did not know that channel 3 was alpha, it would just get
"R", "G", "B", "channel3".

The new logic is that for all channels, it tries to get the name from
the first image, and if it doesn't exist, then it gets it from the
second. Also it's smarter about setting alpha_channel and z_channel in
the spec of the output, even if those didn't come along with the first
input.

Interesting edge case I came across:

    oiiotool rgb.exr rgba.exr -add -o out.exr

The logic was that the result had 4 channels (the greater of the two
inputs), but the channel names were just copied straight from the first
input, and it was (coincidentally, in this example) the one with fewer
channels, so it did not know that channel 3 was alpha, it would just get
"R", "G", "B", "channel3".

The new logic is that for all channels, it tries to get the name from
the first image, and if it doesn't exist, then it gets it from the
second. Also it's smarter about setting alpha_channel and z_channel in
the spec of the output, even if those didn't come along with the first
input.
@lgritz lgritz merged commit ea45077 into AcademySoftwareFoundation:master Dec 18, 2017
@lgritz lgritz deleted the lg-channels branch December 18, 2017 18:39
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.

1 participant