DPX: add support for 1-channel (luma, etc.) dpx images #2294
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.
The bones of it were there, just needed some enabling and realizing
that the ConvertToNative/ConvertToRGB (that were unaware of the
1-channel cases and returned errors) were irrelevant for
single-channel images and should simply be bypassed.
Fixes #2291
Aside: Our output of DPX doesn't currently support compression
properly. Fix that someday? (Our input of compressed DPX is fine.)
But it probably doesn't matter much, since the only compression method
DPX allows is run length encoding, which you would expect performs
poorly on real-world photographic or rendered images with infrequent
runs of identical pixel values. I had not previously appreciated this
fact about DPX. Why, why does the industry use this terrible format?