mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Do not reduce size if tile already loaded
Co-Authored-By: Alexander Karpinsky <homm86@gmail.com>
This commit is contained in:
parent
4f9118bdbd
commit
6d8f2f95db
|
@ -216,7 +216,7 @@ class Jpeg2KImageFile(ImageFile.ImageFile):
|
|||
self._reduce = value
|
||||
|
||||
def load(self):
|
||||
if self._reduce:
|
||||
if self.tile and self._reduce:
|
||||
power = 1 << self._reduce
|
||||
adjust = power >> 1
|
||||
self._size = (
|
||||
|
@ -224,7 +224,6 @@ class Jpeg2KImageFile(ImageFile.ImageFile):
|
|||
int((self.size[1] + adjust) / power),
|
||||
)
|
||||
|
||||
if self.tile:
|
||||
# Update the reduce and layers settings
|
||||
t = self.tile[0]
|
||||
t3 = (t[3][0], self._reduce, self.layers, t[3][3], t[3][4])
|
||||
|
|
Loading…
Reference in New Issue
Block a user