OpenImageIO/oiio — pull request #813 by mjmvisser (2014-02-28 21:38:34+00:00)
Title: Handle DPX with (likely) invalid X/Y offset values

We recently hit an inconsistency in how oiio deals with (likely) bad X/Y offset values. All the DPX files we received from one client have their X/Y offset set to 4294967295. Probably-not-so-coincidentally, that's -1 when cast to a signed int, which is what happens at line 194 in dpxinput.cpp (line 194). However, when the same image is written back out in dpxoutput.cpp (line 348), negative x/y offsets are thrown out.

Rather than read these as -1, which isn't possible according to the DPX standard, I propose ignoring any X/Y offset > (max signed int).

(RV and Nuke both ignore the bad offset.)

Here's a patch.

cheers,
-Mark