mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 13:16:52 +03:00
Merge branch 'fast_mpo_open' of github.com:Glandos/Pillow into fast_mpo_open
This commit is contained in:
commit
edc272298b
|
@ -100,16 +100,16 @@ class MpoImageFile(JpegImagePlugin.JpegImageFile):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def adopt(jpeg_instance, mpheader=None):
|
def adopt(jpeg_instance, mpheader=None):
|
||||||
'''
|
"""
|
||||||
Transform the instance of JpegImageFile into
|
Transform the instance of JpegImageFile into
|
||||||
instance of MpoImageFile.
|
an instance of MpoImageFile.
|
||||||
After the call, the JpegImageFile is extended
|
After the call, the JpegImageFile is extended
|
||||||
to be an MpoImageFile.
|
to be an MpoImageFile.
|
||||||
|
|
||||||
This is essentially useful when opening a JPEG
|
This is essentially useful when opening a JPEG
|
||||||
file that reveals itself as an MPO, to avoid
|
file that reveals itself as an MPO, to avoid
|
||||||
double call to _open.
|
double call to _open.
|
||||||
'''
|
"""
|
||||||
jpeg_instance.__class__ = MpoImageFile
|
jpeg_instance.__class__ = MpoImageFile
|
||||||
jpeg_instance._after_jpeg_open(mpheader)
|
jpeg_instance._after_jpeg_open(mpheader)
|
||||||
return jpeg_instance
|
return jpeg_instance
|
||||||
|
|
Loading…
Reference in New Issue
Block a user