This is a little confusing. The image file is a PNG, but you refer to JPG and set origin to 'upper' in this test (and test_pil_image). I think this needs clarifying here and in the docstring.