forked from josch/img2pdf
Compare commits
No commits in common. "41663673185e50ec28d068f21e56771a06d1806c" and "main" have entirely different histories.
4166367318
...
main
3 changed files with 212 additions and 5 deletions
|
@ -13,6 +13,7 @@ matrix:
|
||||||
- netpbm
|
- netpbm
|
||||||
- ghostscript
|
- ghostscript
|
||||||
- mupdf-tools
|
- mupdf-tools
|
||||||
|
- icc-profiles-free
|
||||||
- name: "python 3.9 Windows"
|
- name: "python 3.9 Windows"
|
||||||
os: windows
|
os: windows
|
||||||
language: shell # 'language: python' is an error on Travis CI Windows
|
language: shell # 'language: python' is an error on Travis CI Windows
|
||||||
|
|
|
@ -20,9 +20,6 @@ import warnings
|
||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
SCRIPT_DIR = pathlib.Path(__file__).resolve().parent
|
|
||||||
ICC_PROFILE = SCRIPT_DIR / "tests" / "data" / "sRGB.icc"
|
|
||||||
|
|
||||||
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)
|
||||||
|
@ -307,7 +304,7 @@ def compare(im1, im2, exact, icc, cmyk):
|
||||||
else:
|
else:
|
||||||
iccargs = []
|
iccargs = []
|
||||||
if icc:
|
if icc:
|
||||||
iccargs = ["-profile", ICC_PROFILE]
|
iccargs = ["-profile", "/usr/share/color/icc/sRGB.icc"]
|
||||||
psnr = subprocess.run(
|
psnr = subprocess.run(
|
||||||
["compare"]
|
["compare"]
|
||||||
+ iccargs
|
+ iccargs
|
||||||
|
@ -427,7 +424,7 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
|
||||||
"PSNR",
|
"PSNR",
|
||||||
"(",
|
"(",
|
||||||
"-profile",
|
"-profile",
|
||||||
ICC_PROFILE,
|
"/usr/share/color/icc/ghostscript/srgb.icc",
|
||||||
"-depth",
|
"-depth",
|
||||||
"8",
|
"8",
|
||||||
str(img),
|
str(img),
|
||||||
|
@ -971,6 +968,10 @@ def jpg_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "Joint Photographic Experts Group JFIF format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1027,6 +1028,10 @@ def jpg_rot_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "Joint Photographic Experts Group JFIF format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1066,6 +1071,10 @@ def jpg_cmyk_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
assert identify[0]["image"].get("format") == "JPEG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "Joint Photographic Experts Group JFIF format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/jpeg", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1100,6 +1109,9 @@ def jpg_2000_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "JP2", str(identify)
|
assert identify[0]["image"].get("format") == "JP2", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "JPEG-2000 File Format Syntax"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/jp2", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/jp2", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1133,6 +1145,9 @@ def png_rgb8_img(tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1149,6 +1164,7 @@ 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)
|
||||||
|
@ -1182,6 +1198,9 @@ def png_rgb16_img(tmp_normal16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1198,6 +1217,7 @@ 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"
|
||||||
|
@ -1235,6 +1255,9 @@ def png_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1251,6 +1274,7 @@ 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)
|
||||||
|
@ -1285,6 +1309,9 @@ def png_rgba16_img(tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1301,6 +1328,7 @@ 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"
|
||||||
|
@ -1351,6 +1379,9 @@ def png_gray8a_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1367,6 +1398,7 @@ 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)
|
||||||
|
@ -1413,6 +1445,9 @@ def png_gray16a_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1429,6 +1464,7 @@ 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"
|
||||||
|
@ -1467,6 +1503,9 @@ def png_interlaced_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1483,6 +1522,7 @@ 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)
|
||||||
|
@ -1518,6 +1558,9 @@ def png_gray1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1534,6 +1577,7 @@ 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)
|
||||||
|
@ -1568,6 +1612,9 @@ def png_gray2_img(tmp_path_factory, tmp_gray2_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1584,6 +1631,7 @@ 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)
|
||||||
|
@ -1618,6 +1666,9 @@ def png_gray4_img(tmp_path_factory, tmp_gray4_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1634,6 +1685,7 @@ 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)
|
||||||
|
@ -1668,6 +1720,9 @@ def png_gray8_img(tmp_path_factory, tmp_gray8_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1684,6 +1739,7 @@ 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)
|
||||||
|
@ -1718,6 +1774,9 @@ def png_gray16_img(tmp_path_factory, tmp_gray16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1734,6 +1793,7 @@ 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"
|
||||||
|
@ -1769,6 +1829,9 @@ def png_palette1_img(tmp_path_factory, tmp_palette1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1785,6 +1848,7 @@ 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)
|
||||||
|
@ -1819,6 +1883,9 @@ def png_palette2_img(tmp_path_factory, tmp_palette2_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1835,6 +1902,7 @@ 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)
|
||||||
|
@ -1869,6 +1937,9 @@ def png_palette4_img(tmp_path_factory, tmp_palette4_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1885,6 +1956,7 @@ 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)
|
||||||
|
@ -1919,6 +1991,9 @@ def png_palette8_img(tmp_path_factory, tmp_palette8_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -1935,6 +2010,7 @@ 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)
|
||||||
|
@ -1969,6 +2045,10 @@ def gif_transparent_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2004,6 +2084,10 @@ def gif_palette1_img(tmp_path_factory, tmp_palette1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2039,6 +2123,10 @@ def gif_palette2_img(tmp_path_factory, tmp_palette2_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2074,6 +2162,10 @@ def gif_palette4_img(tmp_path_factory, tmp_palette4_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2109,6 +2201,10 @@ def gif_palette8_img(tmp_path_factory, tmp_palette8_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2148,6 +2244,10 @@ def gif_animation_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2177,6 +2277,10 @@ def gif_animation_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
assert identify[0]["image"].get("format") == "GIF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"]["formatDescription"]
|
||||||
|
== "CompuServe graphics interchange format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/gif", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2223,6 +2327,9 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2244,6 +2351,7 @@ 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"
|
||||||
|
@ -2276,6 +2384,9 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2296,6 +2407,7 @@ 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)
|
||||||
|
@ -2333,6 +2445,9 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2353,6 +2468,7 @@ 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)
|
||||||
|
@ -2380,6 +2496,9 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2400,6 +2519,7 @@ 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)
|
||||||
|
@ -2428,6 +2548,9 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2452,6 +2575,7 @@ 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)
|
||||||
|
@ -2480,6 +2604,9 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2504,6 +2631,7 @@ 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)
|
||||||
|
@ -2532,6 +2660,9 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2552,6 +2683,7 @@ 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)
|
||||||
|
@ -2580,6 +2712,9 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2600,6 +2735,7 @@ 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)
|
||||||
|
@ -2628,6 +2764,9 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2648,6 +2787,7 @@ 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)
|
||||||
|
@ -2674,6 +2814,9 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2694,6 +2837,7 @@ 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)
|
||||||
|
@ -2721,6 +2865,9 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2741,6 +2888,7 @@ 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)
|
||||||
|
@ -2768,6 +2916,9 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2788,6 +2939,7 @@ 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)
|
||||||
|
@ -2815,6 +2967,9 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2835,6 +2990,7 @@ 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)
|
||||||
|
@ -2862,6 +3018,9 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2882,6 +3041,7 @@ 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)
|
||||||
|
@ -2913,6 +3073,9 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2933,6 +3096,7 @@ 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)
|
||||||
|
@ -2953,6 +3117,9 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2973,6 +3140,7 @@ 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)
|
||||||
|
@ -3000,6 +3168,9 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3022,6 +3193,7 @@ 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)
|
||||||
|
@ -3048,6 +3220,9 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3070,6 +3245,7 @@ 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)
|
||||||
|
@ -3096,6 +3272,9 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3118,6 +3297,7 @@ 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)
|
||||||
|
@ -3144,6 +3324,9 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3165,6 +3348,7 @@ 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)
|
||||||
|
@ -3205,6 +3389,9 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3284,6 +3471,9 @@ def tiff_ccitt_msb_m2l_white_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3364,6 +3554,9 @@ def tiff_ccitt_msb_l2m_white_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3449,6 +3642,9 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3537,6 +3733,9 @@ def tiff_ccitt_nometa1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3619,6 +3818,9 @@ def tiff_ccitt_nometa2_img(tmp_path_factory, tmp_gray1_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
assert identify[0]["image"].get("format") == "TIFF", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Tagged Image File Format"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3678,6 +3880,9 @@ def png_icc_img(tmp_icc_png):
|
||||||
identify = [identify]
|
identify = [identify]
|
||||||
assert "image" in identify[0]
|
assert "image" in identify[0]
|
||||||
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
assert identify[0]["image"].get("format") == "PNG", str(identify)
|
||||||
|
assert (
|
||||||
|
identify[0]["image"].get("formatDescription") == "Portable Network Graphics"
|
||||||
|
), str(identify)
|
||||||
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
assert identify[0]["image"].get("mimeType") == "image/png", str(identify)
|
||||||
assert identify[0]["image"].get("geometry") == {
|
assert identify[0]["image"].get("geometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -3694,6 +3899,7 @@ 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)
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue