Changed variable

This commit is contained in:
Andrew Murray 2022-03-04 15:49:37 +11:00
parent 4f8173f53f
commit f7504b1ef9

View File

@ -115,7 +115,7 @@ class PpmImageFile(ImageFile.ImageFile):
if maxval > 255: if maxval > 255:
if not mode == "L": if not mode == "L":
raise ValueError(f"Too many colors for band: {token}") raise ValueError(f"Too many colors for band: {token}")
if token < 2 ** 16: if maxval < 2 ** 16:
self.mode = "I" self.mode = "I"
rawmode = "I;16B" rawmode = "I;16B"
else: else: