'Regression test for #19457
get_image_dimensions fails on some pngs, while Image.size is working good on them'

@unittest.skipUnless(Image, u'Pillow/PIL    not    installed')
def test_bug_19457(self):

    img_path = os.path.join(os.path.dirname(upath(__file__)), u'magic.png')
    try:
        size = get_image_dimensions(img_path)
    except zlib.error:
        self.fail(u'Exception    raised    from    get_image_dimensions().')
    self.assertEqual(size, Image.open(img_path).size)
