|
|
@ -20,6 +20,21 @@ import warnings
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
import pathlib
|
|
|
|
import pathlib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ICC_PROFILE = None
|
|
|
|
|
|
|
|
ICC_PROFILE_PATHS = (
|
|
|
|
|
|
|
|
# Debian
|
|
|
|
|
|
|
|
"/usr/share/color/icc/ghostscript/srgb.icc",
|
|
|
|
|
|
|
|
# Fedora
|
|
|
|
|
|
|
|
"/usr/share/ghostscript/iccprofiles/srgb.icc",
|
|
|
|
|
|
|
|
# Archlinux and Gentoo
|
|
|
|
|
|
|
|
"/usr/share/ghostscript/*/iccprofiles/srgb.icc",
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
for glob in ICC_PROFILE_PATHS:
|
|
|
|
|
|
|
|
for path in pathlib.Path("/").glob(glob.lstrip("/")):
|
|
|
|
|
|
|
|
if path.is_file():
|
|
|
|
|
|
|
|
ICC_PROFILE = path
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
HAVE_MUTOOL = True
|
|
|
|
HAVE_MUTOOL = True
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
ver = subprocess.check_output(["mutool", "-v"], stderr=subprocess.STDOUT)
|
|
|
|
ver = subprocess.check_output(["mutool", "-v"], stderr=subprocess.STDOUT)
|
|
|
@ -304,11 +319,9 @@ def compare(im1, im2, exact, icc, cmyk):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
iccargs = []
|
|
|
|
iccargs = []
|
|
|
|
if icc:
|
|
|
|
if icc:
|
|
|
|
profile = "/usr/share/color/icc/sRGB.icc"
|
|
|
|
if ICC_PROFILE is None:
|
|
|
|
if not os.path.isfile(profile):
|
|
|
|
pytest.skip("Could not locate an ICC profile")
|
|
|
|
warnings.warn(profile + " not present, skipping checks...")
|
|
|
|
iccargs = ["-profile", ICC_PROFILE]
|
|
|
|
return
|
|
|
|
|
|
|
|
iccargs = ["-profile", profile]
|
|
|
|
|
|
|
|
psnr = subprocess.run(
|
|
|
|
psnr = subprocess.run(
|
|
|
|
["compare"]
|
|
|
|
["compare"]
|
|
|
|
+ iccargs
|
|
|
|
+ iccargs
|
|
|
@ -421,10 +434,8 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if icc:
|
|
|
|
if icc:
|
|
|
|
profile = "/usr/share/color/icc/ghostscript/srgb.icc"
|
|
|
|
if ICC_PROFILE is None:
|
|
|
|
if not os.path.isfile(profile):
|
|
|
|
pytest.skip("Could not locate an ICC profile")
|
|
|
|
warnings.warn(profile + " not present, skipping checks...")
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
psnr = subprocess.run(
|
|
|
|
psnr = subprocess.run(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"compare",
|
|
|
|
"compare",
|
|
|
@ -432,7 +443,7 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
|
|
|
|
"PSNR",
|
|
|
|
"PSNR",
|
|
|
|
"(",
|
|
|
|
"(",
|
|
|
|
"-profile",
|
|
|
|
"-profile",
|
|
|
|
profile,
|
|
|
|
ICC_PROFILE,
|
|
|
|
"-depth",
|
|
|
|
"-depth",
|
|
|
|
"8",
|
|
|
|
"8",
|
|
|
|
str(img),
|
|
|
|
str(img),
|
|
|
@ -1154,7 +1165,6 @@ def png_rgb8_img(tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1204,7 +1214,6 @@ def png_rgb16_img(tmp_normal16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
== "16"
|
|
|
|
== "16"
|
|
|
@ -1258,7 +1267,6 @@ def png_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1309,7 +1317,6 @@ def png_rgba16_img(tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
== "16"
|
|
|
|
== "16"
|
|
|
@ -1376,7 +1383,6 @@ def png_gray8a_img(tmp_path_factory, tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1439,7 +1445,6 @@ def png_gray16a_img(tmp_path_factory, tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
== "16"
|
|
|
|
== "16"
|
|
|
@ -1494,7 +1499,6 @@ def png_interlaced_img(tmp_path_factory, tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1546,7 +1550,6 @@ def png_gray1_img(tmp_path_factory, tmp_gray1_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "1"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "1"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1597,7 +1600,6 @@ def png_gray2_img(tmp_path_factory, tmp_gray2_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "2"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "2"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1648,7 +1650,6 @@ def png_gray4_img(tmp_path_factory, tmp_gray4_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "4"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "4"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1699,7 +1700,6 @@ def png_gray8_img(tmp_path_factory, tmp_gray8_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1750,7 +1750,6 @@ def png_gray16_img(tmp_path_factory, tmp_gray16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig")
|
|
|
|
== "16"
|
|
|
|
== "16"
|
|
|
@ -1802,7 +1801,6 @@ def png_palette1_img(tmp_path_factory, tmp_palette1_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "1"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "1"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1853,7 +1851,6 @@ def png_palette2_img(tmp_path_factory, tmp_palette2_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "2"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "2"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1904,7 +1901,6 @@ def png_palette4_img(tmp_path_factory, tmp_palette4_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "4"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "4"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -1955,7 +1951,6 @@ def png_palette8_img(tmp_path_factory, tmp_palette8_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2265,7 +2260,6 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("quantum:format")
|
|
|
|
identify[0]["image"].get("properties", {}).get("quantum:format")
|
|
|
|
== "floating-point"
|
|
|
|
== "floating-point"
|
|
|
@ -2318,7 +2312,6 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2376,7 +2369,6 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2424,7 +2416,6 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2477,7 +2468,6 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2530,7 +2520,6 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2579,7 +2568,6 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2628,7 +2616,6 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2677,7 +2664,6 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2724,7 +2710,6 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2772,7 +2757,6 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2820,7 +2804,6 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2868,7 +2851,6 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2916,7 +2898,6 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -2968,7 +2949,6 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3009,7 +2989,6 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3059,7 +3038,6 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3108,7 +3086,6 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3157,7 +3134,6 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3205,7 +3181,6 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
@ -3735,7 +3710,6 @@ def png_icc_img(tmp_icc_png):
|
|
|
|
"x": 0,
|
|
|
|
"x": 0,
|
|
|
|
"y": 0,
|
|
|
|
"y": 0,
|
|
|
|
}, str(identify)
|
|
|
|
}, str(identify)
|
|
|
|
assert identify[0]["image"].get("compression") == "Zip", str(identify)
|
|
|
|
|
|
|
|
assert (
|
|
|
|
assert (
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
identify[0]["image"].get("properties", {}).get("png:IHDR.bit-depth-orig") == "8"
|
|
|
|
), str(identify)
|
|
|
|
), str(identify)
|
|
|
|