allow 'matte' to be missing in MIFF
This commit is contained in:
parent
e05580a49a
commit
2f736d7891
1 changed files with 2 additions and 2 deletions
|
@ -1696,7 +1696,7 @@ def parse_miff(data):
|
||||||
elif hdata["colorspace"] == "Gray":
|
elif hdata["colorspace"] == "Gray":
|
||||||
numchannels = 1
|
numchannels = 1
|
||||||
colorspace = Colorspace.L
|
colorspace = Colorspace.L
|
||||||
if hdata["matte"]:
|
if hdata.get("matte"):
|
||||||
numchannels += 1
|
numchannels += 1
|
||||||
if hdata.get("profile"):
|
if hdata.get("profile"):
|
||||||
# there is no key encoding the length of icc or exif data
|
# there is no key encoding the length of icc or exif data
|
||||||
|
@ -1746,7 +1746,7 @@ def parse_miff(data):
|
||||||
# case "PseudoClass":
|
# case "PseudoClass":
|
||||||
elif hdata["class"] == "PseudoClass":
|
elif hdata["class"] == "PseudoClass":
|
||||||
assert "colors" in hdata
|
assert "colors" in hdata
|
||||||
if hdata["matte"]:
|
if hdata.get("matte"):
|
||||||
numchannels = 2
|
numchannels = 2
|
||||||
else:
|
else:
|
||||||
numchannels = 1
|
numchannels = 1
|
||||||
|
|
Loading…
Reference in a new issue