OpenImageIO/oiio — pull request #774 by lgritz (2014-01-01 06:35:08+00:00)
Title: DPX bug fix -- inappropriate use of "dpx:ImageDescriptor" could make invalid files

A simple recipe for disaster was

oiiotool rgba.dpx --ch R,G,B -o rgb.dpx

You'd think this would simply strip the alpha from an RGBA file, but
rgba.dpx reported a "dpx:ImageDescriptor" metadata of "RGBA", which when
propagated to rgb.dpx made it produce a file that looked like it still
had 4 channels. Oops.

So this patch ignores the "dpx:ImageDescriptor" metadata upon output, instead
generating the output descriptor based on the number of channels (and in some
cases, refining if the channel names suggest a specific standard interpretation).