Skip to content

Commit

Permalink
Changed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Mar 4, 2022
1 parent 4f8173f commit f7504b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/PpmImagePlugin.py
Expand Up @@ -115,7 +115,7 @@ def _open(self):
if maxval > 255:
if not mode == "L":
raise ValueError(f"Too many colors for band: {token}")
if token < 2 ** 16:
if maxval < 2 ** 16:
self.mode = "I"
rawmode = "I;16B"
else:
Expand Down

0 comments on commit f7504b1

Please sign in to comment.