mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 13:16:52 +03:00
split _open in two parts
This commit is contained in:
parent
30879dfb34
commit
3a7e2e259a
|
@ -46,7 +46,10 @@ class MpoImageFile(JpegImagePlugin.JpegImageFile):
|
||||||
def _open(self):
|
def _open(self):
|
||||||
self.fp.seek(0) # prep the fp in order to pass the JPEG test
|
self.fp.seek(0) # prep the fp in order to pass the JPEG test
|
||||||
JpegImagePlugin.JpegImageFile._open(self)
|
JpegImagePlugin.JpegImageFile._open(self)
|
||||||
self.mpinfo = self._getmp()
|
self._after_jpeg_open(self._getmp())
|
||||||
|
|
||||||
|
def _after_jpeg_open(self, mpheader):
|
||||||
|
self.mpinfo = mpheader
|
||||||
self.__framecount = self.mpinfo[0xB001]
|
self.__framecount = self.mpinfo[0xB001]
|
||||||
self.__mpoffsets = [mpent['DataOffset'] + self.info['mpoffset']
|
self.__mpoffsets = [mpent['DataOffset'] + self.info['mpoffset']
|
||||||
for mpent in self.mpinfo[0xB002]]
|
for mpent in self.mpinfo[0xB002]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user