Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
pubpub-zz committed Jul 20, 2023
1 parent 5d1f36a commit 1384886
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pypdf/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ def _get_imagemode(
color_space = color_space[1]
if isinstance(color_space, IndirectObject):
color_space = color_space.get_object()
mode = _get_imagemode(color_space, color_components, prev_mode)
if mode in ("RGB", "CMYK"):
mode = "P"
return mode
mode2 = _get_imagemode(color_space, color_components, prev_mode)
if mode2 in ("RGB", "CMYK"):
mode2 = "P"
return mode2
elif color_space[0] == "/Separation":
color_space = color_space[2]
elif color_space[0] == "/DeviceN":
Expand Down

0 comments on commit 1384886

Please sign in to comment.