Skip to content

Commit 61d3849

Browse files
author
Matt Land
committed
.
1 parent 1874fa0 commit 61d3849

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

adafruit_imageload/pnm/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ def load(file, header, *, bitmap=None, palette=None):
4545
if len(pnm_header) == 2:
4646
if magic_number.startswith(b"P1"):
4747
from . import pbm_ascii
48+
4849
bitmap = bitmap(pnm_header[0], pnm_header[1], 1)
49-
return pbm_ascii.load(file, pnm_header[0], pnm_header[1], bitmap=bitmap, palette=palette)
50+
return pbm_ascii.load(
51+
file, pnm_header[0], pnm_header[1], bitmap=bitmap, palette=palette
52+
)
5053
if magic_number.startswith(b"P4"):
5154
from . import pbm_binary
55+
5256
bitmap = bitmap(pnm_header[0], pnm_header[1], 1)
53-
return pbm_binary.load(file, pnm_header[0], pnm_header[1], bitmap=bitmap, palette=palette)
57+
return pbm_binary.load(
58+
file, pnm_header[0], pnm_header[1], bitmap=bitmap, palette=palette
59+
)
5460

5561
next_byte = file.read(1)
5662
if next_byte == b"#":

0 commit comments

Comments
 (0)