forked from josch/img2pdf
Compare commits
12 commits
6e6987c982
...
8cbe03d486
Author | SHA1 | Date | |
---|---|---|---|
|
8cbe03d486 | ||
|
968fc0c27a | ||
|
cfbb40b0f6 | ||
|
ff03d9c1cd | ||
|
e6613d3244 | ||
|
219dbd2856 | ||
|
bf51768fb4 | ||
4c5b72dab0 | |||
853a1ec363 | |||
55d589a548 | |||
5c617965f5 | |||
0067edf965 |
3 changed files with 24 additions and 178 deletions
12
README.md
12
README.md
|
@ -80,7 +80,17 @@ Bugs
|
||||||
- Input images with alpha channels are not allowed. PDF only supports
|
- Input images with alpha channels are not allowed. PDF only supports
|
||||||
transparency using binary masks but is unable to store 8-bit transparency
|
transparency using binary masks but is unable to store 8-bit transparency
|
||||||
information as part of the image itself. But img2pdf will always be lossless
|
information as part of the image itself. But img2pdf will always be lossless
|
||||||
and thus, input images must not carry transparency information.
|
and thus, input images must not carry transparency information. You can
|
||||||
|
remove the alpha channel for example with imagemagick:
|
||||||
|
|
||||||
|
convert input.png -background white -alpha remove -alpha off output.png
|
||||||
|
|
||||||
|
- An error is produced if the input image is broken. This commonly happens if
|
||||||
|
the input image has an invalid EXIF Orientation value of zero. Even though
|
||||||
|
only nine different values from 1 to 9 are permitted, Anroid phones and
|
||||||
|
Canon DSLR cameras produce JPEG images with the invalid value of zero.
|
||||||
|
Either fix your input images with `exiftool` or similar software before
|
||||||
|
passing the JPEG to `img2pdf` or run `img2pdf` with `--rotation=ifvalid`.
|
||||||
|
|
||||||
- img2pdf uses PIL (or Pillow) to obtain image meta data and to convert the
|
- img2pdf uses PIL (or Pillow) to obtain image meta data and to convert the
|
||||||
input if necessary. To prevent decompression bomb denial of service attacks,
|
input if necessary. To prevent decompression bomb denial of service attacks,
|
||||||
|
|
|
@ -2747,7 +2747,6 @@ def gui():
|
||||||
|
|
||||||
args = {
|
args = {
|
||||||
"engine": tkinter.StringVar(),
|
"engine": tkinter.StringVar(),
|
||||||
"first_frame_only": tkinter.BooleanVar(),
|
|
||||||
"auto_orient": tkinter.BooleanVar(),
|
"auto_orient": tkinter.BooleanVar(),
|
||||||
"fit": tkinter.StringVar(),
|
"fit": tkinter.StringVar(),
|
||||||
"title": tkinter.StringVar(),
|
"title": tkinter.StringVar(),
|
||||||
|
@ -3707,8 +3706,9 @@ ifvalid, 0, 90, 180 and 270. The default value is auto and indicates that input
|
||||||
images are rotated according to their EXIF Orientation tag. The values none and
|
images are rotated according to their EXIF Orientation tag. The values none and
|
||||||
0 ignore the EXIF Orientation values of the input images. The value ifvalid
|
0 ignore the EXIF Orientation values of the input images. The value ifvalid
|
||||||
acts like auto but ignores invalid EXIF rotation values and only issues a
|
acts like auto but ignores invalid EXIF rotation values and only issues a
|
||||||
warning instead of throwing an error. The values 90, 180 and 270 perform a
|
warning instead of throwing an error. This is useful because many devices like
|
||||||
clockwise rotation of the image.
|
Android phones, Canon cameras or scanners emit an invalid Orientation tag value
|
||||||
|
of zero. The values 90, 180 and 270 perform a clockwise rotation of the image.
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
sizeargs.add_argument(
|
sizeargs.add_argument(
|
||||||
|
|
|
@ -304,7 +304,11 @@ def compare(im1, im2, exact, icc, cmyk):
|
||||||
else:
|
else:
|
||||||
iccargs = []
|
iccargs = []
|
||||||
if icc:
|
if icc:
|
||||||
iccargs = ["-profile", "/usr/share/color/icc/sRGB.icc"]
|
profile = "/usr/share/color/icc/sRGB.icc"
|
||||||
|
if not os.path.isfile(profile):
|
||||||
|
warnings.warn(profile + " not present, skipping checks...")
|
||||||
|
return
|
||||||
|
iccargs = ["-profile", profile]
|
||||||
psnr = subprocess.run(
|
psnr = subprocess.run(
|
||||||
["compare"]
|
["compare"]
|
||||||
+ iccargs
|
+ iccargs
|
||||||
|
@ -434,6 +438,10 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if icc:
|
if icc:
|
||||||
|
profile = "/usr/share/color/icc/ghostscript/srgb.icc"
|
||||||
|
if not os.path.isfile(profile):
|
||||||
|
warnings.warn(profile + " not present, skipping checks...")
|
||||||
|
return
|
||||||
psnr = subprocess.run(
|
psnr = subprocess.run(
|
||||||
[
|
[
|
||||||
"compare",
|
"compare",
|
||||||
|
@ -441,7 +449,7 @@ def compare_pdfimages_png(tmpdir, img, pdf, exact=True, icc=False):
|
||||||
"PSNR",
|
"PSNR",
|
||||||
"(",
|
"(",
|
||||||
"-profile",
|
"-profile",
|
||||||
"/usr/share/color/icc/ghostscript/srgb.icc",
|
profile,
|
||||||
"-depth",
|
"-depth",
|
||||||
"8",
|
"8",
|
||||||
str(img),
|
str(img),
|
||||||
|
@ -985,10 +993,6 @@ 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,
|
||||||
|
@ -1045,10 +1049,6 @@ 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,
|
||||||
|
@ -1088,10 +1088,6 @@ 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,
|
||||||
|
@ -1126,9 +1122,6 @@ 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") in ["JPEG-2000 File Format Syntax", "JP2"]
|
|
||||||
), 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,
|
||||||
|
@ -1162,9 +1155,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1215,9 +1205,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1272,9 +1259,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1326,9 +1310,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1396,9 +1377,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1462,9 +1440,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1520,9 +1495,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1575,9 +1547,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1629,9 +1598,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1683,9 +1649,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1737,9 +1700,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1791,9 +1751,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1846,9 +1803,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1900,9 +1854,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -1954,9 +1905,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -2008,9 +1956,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
@ -2062,10 +2007,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2101,10 +2042,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2140,10 +2077,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2179,10 +2112,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2218,10 +2147,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2261,10 +2186,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2294,10 +2215,6 @@ 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"]
|
|
||||||
in ["CompuServe graphics interchange format", "GIF"]
|
|
||||||
), 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,
|
||||||
|
@ -2344,9 +2261,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2409,9 +2323,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2472,9 +2383,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2531,9 +2439,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2591,9 +2496,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2655,9 +2557,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2719,9 +2618,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2780,9 +2676,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2841,9 +2734,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2901,9 +2791,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -2962,9 +2849,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3023,9 +2907,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3084,9 +2965,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3145,9 +3023,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3208,9 +3083,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3252,9 +3124,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3311,9 +3180,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3371,9 +3237,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3431,9 +3294,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3491,9 +3351,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3558,9 +3415,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3642,9 +3496,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3727,9 +3578,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3817,9 +3665,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3910,9 +3755,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -3997,9 +3839,6 @@ 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") in ["Tagged Image File Format", "TIFF"]
|
|
||||||
), 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,
|
||||||
|
@ -4059,9 +3898,6 @@ 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") in ["Portable Network Graphics", "PNG"]
|
|
||||||
), 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,
|
||||||
|
|
Loading…
Reference in a new issue