mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fixed rounding.
This commit is contained in:
parent
d6b8f0f666
commit
7dba77364a
|
@ -165,7 +165,9 @@ class Jpeg2KImageFile(ImageFile.ImageFile):
|
|||
def load(self):
|
||||
if self.reduce:
|
||||
power = 1 << self.reduce
|
||||
self.size = (self.size[0] / power, self.size[1] / power)
|
||||
adjust = power >> 1
|
||||
self.size = ((self.size[0] + adjust) / power,
|
||||
(self.size[1] + adjust) / power)
|
||||
|
||||
ImageFile.ImageFile.load(self)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user