OpenImageIO/oiio — pull request #702 by lgritz (2013-10-16 03:52:32+00:00)
Title: maketx fixes for odd overscan/crop combinations

maketx had some special code to properly handle source images that were cropped (in EXR terms, when the pixel data window is a subset of the display window).

maketx also had some special code to handle overscan source images (when the pixel data is a superset of the display window).

So of course production defeated this logic by attempting to make a texture out of a source image that was cropped horizontally, but overscanned vertically! Because that's the kind of thing that production is excels at: finding the edge cases you never consider.

This patch fixes it and, I believe, will handle making a texture out of any combination of data and display windows. It certainly works on all our previous tests, as well as the problem cases that brought this to my attention. It must incorporate pull request #698. Review separately or together, I don't care. (I submitted the resize bug -- discovered in pursuit of this problem -- separately, mostly because I was confident about that fix before I was fully done with the maketx side of things.)