Compare commits
2 commits
acc25a4926
...
2f736d7891
Author | SHA1 | Date | |
---|---|---|---|
2f736d7891 | |||
e05580a49a |
2 changed files with 5 additions and 5 deletions
|
@ -1696,7 +1696,7 @@ def parse_miff(data):
|
|||
elif hdata["colorspace"] == "Gray":
|
||||
numchannels = 1
|
||||
colorspace = Colorspace.L
|
||||
if hdata["matte"]:
|
||||
if hdata.get("matte"):
|
||||
numchannels += 1
|
||||
if hdata.get("profile"):
|
||||
# there is no key encoding the length of icc or exif data
|
||||
|
@ -1746,7 +1746,7 @@ def parse_miff(data):
|
|||
# case "PseudoClass":
|
||||
elif hdata["class"] == "PseudoClass":
|
||||
assert "colors" in hdata
|
||||
if hdata["matte"]:
|
||||
if hdata.get("matte"):
|
||||
numchannels = 2
|
||||
else:
|
||||
numchannels = 1
|
||||
|
|
|
@ -3873,7 +3873,7 @@ def miff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
|||
assert "image" in identify[0]
|
||||
assert identify[0]["image"].get("format") == "MIFF", str(identify)
|
||||
assert identify[0]["image"].get("class") == "DirectClass"
|
||||
assert identify[0]["image"].get("baseType") == "ColorSeparation"
|
||||
assert identify[0]["image"].get("type") == "ColorSeparation"
|
||||
assert identify[0]["image"].get("geometry") == {
|
||||
"width": 60,
|
||||
"height": 60,
|
||||
|
@ -3917,7 +3917,7 @@ def miff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
|||
assert "image" in identify[0]
|
||||
assert identify[0]["image"].get("format") == "MIFF", str(identify)
|
||||
assert identify[0]["image"].get("class") == "DirectClass"
|
||||
assert identify[0]["image"].get("baseType") == "ColorSeparation"
|
||||
assert identify[0]["image"].get("type") == "ColorSeparation"
|
||||
assert identify[0]["image"].get("geometry") == {
|
||||
"width": 60,
|
||||
"height": 60,
|
||||
|
@ -3952,7 +3952,7 @@ def miff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
|||
assert "image" in identify[0]
|
||||
assert identify[0]["image"].get("format") == "MIFF", str(identify)
|
||||
assert identify[0]["image"].get("class") == "DirectClass"
|
||||
assert identify[0]["image"].get("baseType") == "TrueColor"
|
||||
assert identify[0]["image"].get("type") == "TrueColor"
|
||||
assert identify[0]["image"].get("geometry") == {
|
||||
"width": 60,
|
||||
"height": 60,
|
||||
|
|
Loading…
Reference in a new issue