Compare commits
No commits in common. "33139612f85d8e638b759603957ebf62cce46d80" and "85cbe1d1285964f2ef5b6c882180a2fd851355ab" have entirely different histories.
33139612f8
...
85cbe1d128
1 changed files with 84 additions and 106 deletions
|
@ -24,8 +24,6 @@ import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
img2pdfprog = os.getenv("img2pdfprog", default="src/img2pdf.py")
|
img2pdfprog = os.getenv("img2pdfprog", default="src/img2pdf.py")
|
||||||
|
|
||||||
BYTEORDER = "LSB" if sys.byteorder == "little" else "MSB"
|
|
||||||
|
|
||||||
ICC_PROFILE = None
|
ICC_PROFILE = None
|
||||||
ICC_PROFILE_PATHS = (
|
ICC_PROFILE_PATHS = (
|
||||||
# Debian
|
# Debian
|
||||||
|
@ -1630,7 +1628,7 @@ def png_gray1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
"y": 0,
|
"y": 0,
|
||||||
}, str(identify)
|
}, str(identify)
|
||||||
assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
|
assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
|
||||||
assert identify[0]["image"].get("type") in ["Bilevel", "Grayscale"], str(identify)
|
assert identify[0]["image"].get("type") == "Bilevel", str(identify)
|
||||||
assert identify[0]["image"].get("depth") == 1, str(identify)
|
assert identify[0]["image"].get("depth") == 1, str(identify)
|
||||||
assert identify[0]["image"].get("pageGeometry") == {
|
assert identify[0]["image"].get("pageGeometry") == {
|
||||||
"width": 60,
|
"width": 60,
|
||||||
|
@ -2364,7 +2362,7 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2383,10 +2381,9 @@ def tiff_float_img(tmp_path_factory, tmp_normal_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2429,7 +2426,7 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2443,10 +2440,9 @@ def tiff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "separated"
|
== "separated"
|
||||||
|
@ -2492,7 +2488,7 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2506,10 +2502,9 @@ def tiff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "separated"
|
== "separated"
|
||||||
|
@ -2545,7 +2540,7 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2559,10 +2554,9 @@ def tiff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2605,7 +2599,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2619,10 +2613,9 @@ def tiff_rgb12_img(tmp_path_factory, tmp_normal16_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2665,7 +2658,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2679,10 +2672,9 @@ def tiff_rgb14_img(tmp_path_factory, tmp_normal16_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2725,7 +2717,7 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2739,10 +2731,9 @@ def tiff_rgb16_img(tmp_path_factory, tmp_normal16_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2786,7 +2777,7 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2800,10 +2791,9 @@ def tiff_rgba8_img(tmp_path_factory, tmp_alpha_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2847,7 +2837,7 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2861,10 +2851,9 @@ def tiff_rgba16_img(tmp_path_factory, tmp_alpha_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unassociated"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -2907,7 +2896,7 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2921,10 +2910,9 @@ def tiff_gray1_img(tmp_path_factory, tmp_gray1_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "min-is-black"
|
== "min-is-black"
|
||||||
|
@ -2968,7 +2956,7 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -2982,10 +2970,9 @@ def tiff_gray2_img(tmp_path_factory, tmp_gray2_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "min-is-black"
|
== "min-is-black"
|
||||||
|
@ -3029,7 +3016,7 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3043,10 +3030,9 @@ def tiff_gray4_img(tmp_path_factory, tmp_gray4_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "min-is-black"
|
== "min-is-black"
|
||||||
|
@ -3090,7 +3076,7 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3104,10 +3090,9 @@ def tiff_gray8_img(tmp_path_factory, tmp_gray8_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "min-is-black"
|
== "min-is-black"
|
||||||
|
@ -3151,7 +3136,7 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3165,10 +3150,9 @@ def tiff_gray16_img(tmp_path_factory, tmp_gray16_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
identify[0]["image"].get("properties", {}).get("tiff:photometric")
|
||||||
== "min-is-black"
|
== "min-is-black"
|
||||||
|
@ -3214,7 +3198,7 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3228,10 +3212,9 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -3258,7 +3241,7 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3272,10 +3255,9 @@ def tiff_multipage_img(tmp_path_factory, tmp_normal_png, tmp_inverse_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "RGB"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -3311,7 +3293,7 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3327,10 +3309,9 @@ def tiff_palette1_img(tmp_path_factory, tmp_palette1_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -3365,7 +3346,7 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3381,10 +3362,9 @@ def tiff_palette2_img(tmp_path_factory, tmp_palette2_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -3419,7 +3399,7 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3435,10 +3415,9 @@ def tiff_palette4_img(tmp_path_factory, tmp_palette4_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -3473,7 +3452,7 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -3488,10 +3467,9 @@ def tiff_palette8_img(tmp_path_factory, tmp_palette8_png):
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
assert (
|
assert identify[0]["image"].get("properties", {}).get("tiff:endian") == "lsb", str(
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:endian")
|
identify
|
||||||
== BYTEORDER.lower()
|
)
|
||||||
), str(identify)
|
|
||||||
assert (
|
assert (
|
||||||
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
identify[0]["image"].get("properties", {}).get("tiff:photometric") == "palette"
|
||||||
), str(identify)
|
), str(identify)
|
||||||
|
@ -4045,7 +4023,7 @@ def miff_cmyk8_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -4096,7 +4074,7 @@ def miff_cmyk16_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
@ -4138,7 +4116,7 @@ def miff_rgb8_img(tmp_path_factory, tmp_normal_png):
|
||||||
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
|
||||||
assert identify[0]["image"].get(endian) in [
|
assert identify[0]["image"].get(endian) in [
|
||||||
"Undefined",
|
"Undefined",
|
||||||
BYTEORDER,
|
"LSB",
|
||||||
], str(
|
], str(
|
||||||
identify
|
identify
|
||||||
) # FIXME: should be LSB
|
) # FIXME: should be LSB
|
||||||
|
|
Loading…
Reference in a new issue