mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +03:00
Added return for J2k (and fpx) Load to return a pixel access object
This commit is contained in:
parent
37841dbaeb
commit
cf27e03dcd
|
@ -216,7 +216,7 @@ class FpxImageFile(ImageFile.ImageFile):
|
|||
self.fp = self.ole.openstream(self.stream[:2] +
|
||||
["Subimage 0000 Data"])
|
||||
|
||||
ImageFile.ImageFile.load(self)
|
||||
return ImageFile.ImageFile.load(self)
|
||||
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
|
|
|
@ -207,7 +207,7 @@ class Jpeg2KImageFile(ImageFile.ImageFile):
|
|||
t3 = (t[3][0], self.reduce, self.layers, t[3][3], t[3][4])
|
||||
self.tile = [(t[0], (0, 0) + self.size, t[2], t3)]
|
||||
|
||||
ImageFile.ImageFile.load(self)
|
||||
return ImageFile.ImageFile.load(self)
|
||||
|
||||
|
||||
def _accept(prefix):
|
||||
|
|
|
@ -34,7 +34,8 @@ class TestFileJpeg2k(PillowTestCase):
|
|||
self.assertRegexpMatches(Image.core.jp2klib_version, '\d+\.\d+\.\d+$')
|
||||
|
||||
im = Image.open('Tests/images/test-card-lossless.jp2')
|
||||
im.load()
|
||||
px = im.load()
|
||||
self.assertTrue(px)
|
||||
self.assertEqual(im.mode, 'RGB')
|
||||
self.assertEqual(im.size, (640, 480))
|
||||
self.assertEqual(im.format, 'JPEG2000')
|
||||
|
|
Loading…
Reference in New Issue
Block a user