ImageEngine/gaffer — pull request #696 by goddardl (2013-12-17 19:27:32+00:00)
Title: GafferImageTestModule and JPG reader tests.

This pull request adds several tests in both python and cpp that highlight a bug in OIIO's implementation of get_pixels.

The first of the two commits adds a test in python that compares the loading of identical JPG and EXR images against each other to highlight that JPG images are read in incorrectly.

The second of the two commits adds a GafferImageTest module and two test cases which prove that there is a bug in OIIO's get_pixel method. The test case loads both a JPG and an EXR using both versions of the overloaded get_pixel method and compares the results for each channel. One version of get_pixel acquires all of the channel data and the other just a single channel at a time. When comparing these results we would expect them to be the same. However, it appears that the call to get_pixel which retrieves only a single channel is only loading the red channel correctly with the green and blue channels being shifted to the left by one and two pixels respectively.

Out of these two test cases, only the loading of the JPG fails.

I am in the middle of submitting this bug to OIIO but these test cases would be useful to prove that it works when a new patch is rolled out.