This commit is contained in:
Ujjwal Verma 2017-06-25 01:13:09 +05:30
parent 8ca29679df
commit 3977eecbb9
2 changed files with 7 additions and 6 deletions

View File

@ -91,12 +91,12 @@ def parse_ico(data: bytes) -> Metadata:
for i, image in enumerate(img.images):
parts.append(
(
'Image {}'.format(i+1), "Size: {} x {}\n"
"{: >18}Bits per pixel: {}\n"
"{: >18}PNG: {}".format(256 if not image.width else image.width,
256 if not image.height else image.height,
'', image.bpp,
'', image.is_png)
'Image {}'.format(i + 1), "Size: {} x {}\n"
"{: >18}Bits per pixel: {}\n"
"{: >18}PNG: {}".format(256 if not image.width else image.width,
256 if not image.height else image.height,
'', image.bpp,
'', image.is_png)
)
)

View File

@ -9,6 +9,7 @@ def test_ico(h, f):
if h.startswith(b"\x00\x00\x01\x00"):
return "ico"
imghdr.tests.append(test_ico)