diff --git a/Tests/test_image_fromarray_la.py b/Tests/test_image_fromarray_la.py new file mode 100644 index 000000000..15931b16d --- /dev/null +++ b/Tests/test_image_fromarray_la.py @@ -0,0 +1,22 @@ +from helper import unittest, PillowTestCase + +from PIL import Image + +import numpy as np + +class TestImageFromArrayLA(PillowTestCase): + + def test_sanity(self): + ar1 = (np.random.random((40,40,2))*255).astype('uint8') + im1 = Image.fromarray(ar1) + arr = np.array(im1.getdata(), 'uint8') + ar2 = arr.reshape(im1.size[1], im1.size[0], arr.shape[1]) + im2 = Image.fromarray(ar2) + + self.assert_image_equal(im1, im2) + + +if __name__ == '__main__': + unittest.main() + +# End of file