A few test case failures on Fedora 37 with ImageMagick 7 #152

Closed
opened 2023-01-15 19:45:28 +00:00 by gms · 22 comments

Fedora just recently switched to ImageMagick 7.

It looks like the switch caused some test cases to fail (from a Fedora Rawhide, i.e. future Fedora 38 build):

>           assert identify[0]["image"].get("depth") == 16, str(identify)
E           AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_rgb83/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'LSB', 'colorspace': 'sRGB', 'depth': 12, 'baseDepth': 12, 'channelDepth': {'red': 12, 'green': 12, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 4095.94, 'mean': 1195.62, 'median': 0, 'standardDeviation': 1707.91, 'kurtosis': -1.00122, 'skewness': 0.914892, 'entropy': 0.446271}}, 'channelStatistics': {'red': {'min': 0, 'max': 4095.94, 'mean': 1195.75, 'median': 0, 'standardDeviation': 1707.47, 'kurtosis': -1.00107, 'skewness': 0.914908, 'entropy': 0.447488}, 'green': {'min': 0, 'max': 4095.94, 'mean': 1197.71, 'median': 0, 'standardDeviation': 1708.79, 'kurtosis': -1.00682, 'skewness': 0.912032, 'entropy': 0.446303}, 'blue': {'min': 0, 'max': 4095.94, 'mean': 1193.41, 'median': 0, 'standardDeviation': 1707.48, 'kurtosis': -0.997979, 'skewness': 0.916978, 'entropy': 0.445022}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'Zip', 'orientation': 'TopLeft', 'properties': {'signature': 'ab114596e3a7eed7e487e31ebdf5128417bc878e9847df01cb939f74802b12fd', 'tiff:alpha': 'unspecified', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}, 'tainted': False, 'filesize': '5214B', 'numberPixels': '3600', 'pixelsPerSecond': '5.04803MB', 'userTime': '0.000u', 'elapsedTime': '0:01.000', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI x86_64 20701 https://imagemagick.org'}}]
E           assert 12 == 16
E            +  where 12 = <built-in method get of dict object at 0x7fa4ebb504c0>('depth')
E            +    where <built-in method get of dict object at 0x7fa4ebb504c0> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 12, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get
src/img2pdf_test.py:2547: AssertionErro
[..]
>       assert identify[0]["image"].get("depth") == 16, str(identify)
E       AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_rgb84/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'LSB', 'colorspace': 'sRGB', 'depth': 14, 'baseDepth': 14, 'channelDepth': {'red': 14, 'green': 14, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 16383.8, 'mean': 4782.56, 'median': 0, 'standardDeviation': 6831.69, 'kurtosis': -1.00124, 'skewness': 0.914883, 'entropy': 0.446271}}, 'channelStatistics': {'red': {'min': 0, 'max': 16383.8, 'mean': 4783.06, 'median': 0, 'standardDeviation': 6829.89, 'kurtosis': -1.00108, 'skewness': 0.914899, 'entropy': 0.447488}, 'green': {'min': 0, 'max': 16383.8, 'mean': 4790.9, 'median': 0, 'standardDeviation': 6835.21, 'kurtosis': -1.00683, 'skewness': 0.912023, 'entropy': 0.446303}, 'blue': {'min': 0, 'max': 16383.8, 'mean': 4773.72, 'median': 0, 'standardDeviation': 6829.96, 'kurtosis': -0.997995, 'skewness': 0.916969, 'entropy': 0.445022}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'Zip', 'orientation': 'TopLeft', 'properties': {'signature': '4cfcfdeb7dd11983cb449d4cbc7b0e603012c9488fa4155b3f2187832d0954f9', 'tiff:alpha': 'unspecified', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}, 'tainted': False, 'filesize': '6328B', 'numberPixels': '3600', 'pixelsPerSecond': '2.94455MB', 'userTime': '0.000u', 'elapsedTime': '0:01.001', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI x86_64 20701 https://imagemagick.org'}}]
E       assert 14 == 16
E        +  where 14 = <built-in method get of dict object at 0x7fa3f4752940>('depth')
E        +    where <built-in method get of dict object at 0x7fa3f4752940> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 14, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get
src/img2pdf_test.py:2604: AssertionError
[..]
            assert psnr != b"0"
>           psnr = float(psnr.strip(b"0"))
E           ValueError: could not convert string to float: b'61.5441 (0.615441)'
src/img2pdf_test.py:347: ValueError
[..]
assert psnr != b"0"
>           psnr = float(psnr.strip(b"0"))
E           ValueError: could not convert string to float: b' (0)'
src/img2pdf_test.py:347: ValueError
=========================== short test summary info ============================
FAILED src/img2pdf_test.py::test_jpg_cmyk[internal] - ValueError: could not c...
FAILED src/img2pdf_test.py::test_jpg_cmyk[pikepdf] - ValueError: could not co...
FAILED src/img2pdf_test.py::test_png_rgb16[internal] - ValueError: could not ...
FAILED src/img2pdf_test.py::test_png_rgb16[pikepdf] - ValueError: could not c...
FAILED src/img2pdf_test.py::test_png_gray16[internal] - ValueError: could not...
FAILED src/img2pdf_test.py::test_png_gray16[pikepdf] - ValueError: could not ...
FAILED src/img2pdf_test.py::test_png_icc[internal] - ValueError: could not co...
FAILED src/img2pdf_test.py::test_png_icc[pikepdf] - ValueError: could not con...
FAILED src/img2pdf_test.py::test_tiff_cmyk8[internal] - ValueError: could not...
FAILED src/img2pdf_test.py::test_tiff_cmyk8[pikepdf] - ValueError: could not ...
ERROR src/img2pdf_test.py::test_tiff_rgb12[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_rgb12[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_rgb14[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_rgb14[pikepdf] - AssertionError: [{'vers...
=========== 10 failed, 283 passed, 4 deselected, 4 errors in 44.47s ============

Full log: https://kojipkgs.fedoraproject.org//work/tasks/5655/96035655/build.log

Fedora just recently switched to ImageMagick 7. It looks like the switch caused some test cases to fail (from a Fedora Rawhide, i.e. future Fedora 38 build): ``` > assert identify[0]["image"].get("depth") == 16, str(identify) E AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_rgb83/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'LSB', 'colorspace': 'sRGB', 'depth': 12, 'baseDepth': 12, 'channelDepth': {'red': 12, 'green': 12, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 4095.94, 'mean': 1195.62, 'median': 0, 'standardDeviation': 1707.91, 'kurtosis': -1.00122, 'skewness': 0.914892, 'entropy': 0.446271}}, 'channelStatistics': {'red': {'min': 0, 'max': 4095.94, 'mean': 1195.75, 'median': 0, 'standardDeviation': 1707.47, 'kurtosis': -1.00107, 'skewness': 0.914908, 'entropy': 0.447488}, 'green': {'min': 0, 'max': 4095.94, 'mean': 1197.71, 'median': 0, 'standardDeviation': 1708.79, 'kurtosis': -1.00682, 'skewness': 0.912032, 'entropy': 0.446303}, 'blue': {'min': 0, 'max': 4095.94, 'mean': 1193.41, 'median': 0, 'standardDeviation': 1707.48, 'kurtosis': -0.997979, 'skewness': 0.916978, 'entropy': 0.445022}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'Zip', 'orientation': 'TopLeft', 'properties': {'signature': 'ab114596e3a7eed7e487e31ebdf5128417bc878e9847df01cb939f74802b12fd', 'tiff:alpha': 'unspecified', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}, 'tainted': False, 'filesize': '5214B', 'numberPixels': '3600', 'pixelsPerSecond': '5.04803MB', 'userTime': '0.000u', 'elapsedTime': '0:01.000', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI x86_64 20701 https://imagemagick.org'}}] E assert 12 == 16 E + where 12 = <built-in method get of dict object at 0x7fa4ebb504c0>('depth') E + where <built-in method get of dict object at 0x7fa4ebb504c0> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 12, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get src/img2pdf_test.py:2547: AssertionErro [..] > assert identify[0]["image"].get("depth") == 16, str(identify) E AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_rgb84/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'LSB', 'colorspace': 'sRGB', 'depth': 14, 'baseDepth': 14, 'channelDepth': {'red': 14, 'green': 14, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 16383.8, 'mean': 4782.56, 'median': 0, 'standardDeviation': 6831.69, 'kurtosis': -1.00124, 'skewness': 0.914883, 'entropy': 0.446271}}, 'channelStatistics': {'red': {'min': 0, 'max': 16383.8, 'mean': 4783.06, 'median': 0, 'standardDeviation': 6829.89, 'kurtosis': -1.00108, 'skewness': 0.914899, 'entropy': 0.447488}, 'green': {'min': 0, 'max': 16383.8, 'mean': 4790.9, 'median': 0, 'standardDeviation': 6835.21, 'kurtosis': -1.00683, 'skewness': 0.912023, 'entropy': 0.446303}, 'blue': {'min': 0, 'max': 16383.8, 'mean': 4773.72, 'median': 0, 'standardDeviation': 6829.96, 'kurtosis': -0.997995, 'skewness': 0.916969, 'entropy': 0.445022}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'Zip', 'orientation': 'TopLeft', 'properties': {'signature': '4cfcfdeb7dd11983cb449d4cbc7b0e603012c9488fa4155b3f2187832d0954f9', 'tiff:alpha': 'unspecified', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}, 'tainted': False, 'filesize': '6328B', 'numberPixels': '3600', 'pixelsPerSecond': '2.94455MB', 'userTime': '0.000u', 'elapsedTime': '0:01.001', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI x86_64 20701 https://imagemagick.org'}}] E assert 14 == 16 E + where 14 = <built-in method get of dict object at 0x7fa3f4752940>('depth') E + where <built-in method get of dict object at 0x7fa3f4752940> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 14, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get src/img2pdf_test.py:2604: AssertionError [..] assert psnr != b"0" > psnr = float(psnr.strip(b"0")) E ValueError: could not convert string to float: b'61.5441 (0.615441)' src/img2pdf_test.py:347: ValueError [..] assert psnr != b"0" > psnr = float(psnr.strip(b"0")) E ValueError: could not convert string to float: b' (0)' src/img2pdf_test.py:347: ValueError =========================== short test summary info ============================ FAILED src/img2pdf_test.py::test_jpg_cmyk[internal] - ValueError: could not c... FAILED src/img2pdf_test.py::test_jpg_cmyk[pikepdf] - ValueError: could not co... FAILED src/img2pdf_test.py::test_png_rgb16[internal] - ValueError: could not ... FAILED src/img2pdf_test.py::test_png_rgb16[pikepdf] - ValueError: could not c... FAILED src/img2pdf_test.py::test_png_gray16[internal] - ValueError: could not... FAILED src/img2pdf_test.py::test_png_gray16[pikepdf] - ValueError: could not ... FAILED src/img2pdf_test.py::test_png_icc[internal] - ValueError: could not co... FAILED src/img2pdf_test.py::test_png_icc[pikepdf] - ValueError: could not con... FAILED src/img2pdf_test.py::test_tiff_cmyk8[internal] - ValueError: could not... FAILED src/img2pdf_test.py::test_tiff_cmyk8[pikepdf] - ValueError: could not ... ERROR src/img2pdf_test.py::test_tiff_rgb12[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_rgb12[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_rgb14[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_rgb14[pikepdf] - AssertionError: [{'vers... =========== 10 failed, 283 passed, 4 deselected, 4 errors in 44.47s ============ ``` Full log: https://kojipkgs.fedoraproject.org//work/tasks/5655/96035655/build.log
Author

ImageMagick version: ImageMagick 1:7.1.0.57-1.fc38

Img2pdf version: 0.4.4

ImageMagick version: ImageMagick 1:7.1.0.57-1.fc38 Img2pdf version: 0.4.4
Author

Ok, I added the following patch to fix the ValueError:

--- a/src/img2pdf_test.py	2023-01-22 18:36:32.208977359 +0100
+++ b/src/img2pdf_test.py	2023-01-22 18:39:52.918531386 +0100
@@ -345,7 +345,7 @@
             stderr=subprocess.PIPE,
         ).stderr
         assert psnr != b"0"
-        psnr = float(psnr.strip(b"0"))
+        psnr = float(psnr.split()[0])
         assert psnr != 0  # or otherwise we would use the exact variant
         assert psnr > 50
 
@@ -501,7 +501,7 @@
                 stderr=subprocess.PIPE,
             ).stderr
         assert psnr != b"0"
-        psnr = float(psnr.strip(b"0"))
+        psnr = float(psnr.split()[0])
         assert psnr != 0  # or otherwise we would use the exact variant
         assert psnr > 50
     (tmpdir / "images-000.png").unlink()

The still failing tests can then be selected by the following pytest expression (-k):

jpg_cmyk or png_gray16[ or tiff_cmyk8 or tiff_rgb12 or tiff_rgb14'

I also tested it on Fedora 37 (i.e. still ImageMagick-6.9.12.70-1.fc37.x86_64) and there the following tests also fail:

ImageMagick-6.9.12.70-1.fc37.x86_64

In addition to that, some additional test cases fail when running them on PPC64LE.

(The Fedora build system builds noarch Python packages such as img2pdf not on all supported architectures, but picks a build server basically by chance - thus the tests run on rather niche architectures, only from time to time.)

_________________ ERROR at setup of test_tiff_float[internal] __________________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fff7ff9eb10>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'))
tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png')
    @pytest.fixture(scope="session")
    def tiff_float_img(tmp_path_factory, tmp_normal_png):
        in_img = tmp_path_factory.mktemp("tiff_float_img") / "in.tiff"
        subprocess.check_call(
            CONVERT
            + [
                str(tmp_normal_png),
                "-depth",
                "32",
                "-define",
                "quantum:format=floating-point",
                str(in_img),
            ]
        )
        identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"]))
        assert len(identify) == 1
        # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was
        # put into an array, here we cater for the older version containing just
        # the bare dictionary
        if "image" in identify:
            identify = [identify]
        assert "image" in identify[0]
        assert identify[0]["image"].get("format") == "TIFF", str(identify)
        assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
        assert identify[0]["image"].get("geometry") == {
            "width": 60,
            "height": 60,
            "x": 0,
            "y": 0,
        }, str(identify)
        assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
        assert identify[0]["image"].get("type") == "TrueColor", str(identify)
        endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness"
>       assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str(
            identify
        )  # FIXME: should be LSB
E       AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_float_img0/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'MSB', 'colorspace': 'sRGB', 'depth': 8, 'baseDepth': 32, 'channelDepth': {'red': 8, 'green': 8, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 65535, 'mean': 19055.6, 'median': 0, 'standardDeviation': 27243.5, 'kurtosis': -1.00126, 'skewness': 0.915343, 'entropy': 0.460859}}, 'channelStatistics': {'red': {'min': 0, 'max': 65535, 'mean': 19057.6, 'median': 0, 'standardDeviation': 27236.4, 'kurtosis': -1.0011, 'skewness': 0.915359, 'entropy': 0.462046}, 'green': {'min': 0, 'max': 65535, 'mean': 19088.9, 'median': 0, 'standardDeviation': 27257.5, 'kurtosis': -1.00686, 'skewness': 0.912479, 'entropy': 0.460981}, 'blue': {'min': 0, 'max': 65535, 'mean': 19020.4, 'median': 0, 'standardDeviation': 27236.6, 'kurtosis': -0.998009, 'skewness': 0.917431, 'entropy': 0.459548}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'None', 'orientation': 'TopLeft', 'properties': {'quantum:format': 'floating-point', 'signature': '347da9cc530cc040b2818b07e399104f8cd8dd42a484eb9524b0ba9970fb8cd2', 'tiff:alpha': 'unspecified', 'tiff:endian': 'msb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '11'}, 'tainted': False, 'filesize': '43530B', 'numberPixels': '3600', 'pixelsPerSecond': '4.14129MB', 'userTime': '0.000u', 'elapsedTime': '0:01.000', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI powerpc64le 20701 https://imagemagick.org'}}]
E       assert 'MSB' in ['Undefined', 'LSB']
E        +  where 'MSB' = <built-in method get of dict object at 0x7fff7ce76580>('endianness')
E        +    where <built-in method get of dict object at 0x7fff7ce76580> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 32, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get
src/img2pdf_test.py:2316: AssertionError
[..]
=========================== short test summary info ============================
ERROR src/img2pdf_test.py::test_tiff_float[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_float[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_cmyk16[internal] - AssertionError: [{'ve...
ERROR src/img2pdf_test.py::test_tiff_cmyk16[pikepdf] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_rgb8[internal] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_rgb8[pikepdf] - AssertionError: [{'versi...
ERROR src/img2pdf_test.py::test_tiff_rgb16[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_rgb16[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_rgba8[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_rgba8[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_rgba16[internal] - AssertionError: [{'ve...
ERROR src/img2pdf_test.py::test_tiff_rgba16[pikepdf] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_gray1[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_gray1[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_gray2[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_gray2[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_gray4[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_gray4[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_gray8[internal] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_gray8[pikepdf] - AssertionError: [{'vers...
ERROR src/img2pdf_test.py::test_tiff_gray16[internal] - AssertionError: [{'ve...
ERROR src/img2pdf_test.py::test_tiff_gray16[pikepdf] - AssertionError: [{'ver...
ERROR src/img2pdf_test.py::test_tiff_multipage[internal] - AssertionError: [{...
ERROR src/img2pdf_test.py::test_tiff_multipage[pikepdf] - AssertionError: [{'...
ERROR src/img2pdf_test.py::test_tiff_palette1[internal] - AssertionError: [{'...
ERROR src/img2pdf_test.py::test_tiff_palette1[pikepdf] - AssertionError: [{'v...
ERROR src/img2pdf_test.py::test_tiff_palette2[internal] - AssertionError: [{'...
ERROR src/img2pdf_test.py::test_tiff_palette2[pikepdf] - AssertionError: [{'v...
ERROR src/img2pdf_test.py::test_tiff_palette4[internal] - AssertionError: [{'...
ERROR src/img2pdf_test.py::test_tiff_palette4[pikepdf] - AssertionError: [{'v...
ERROR src/img2pdf_test.py::test_tiff_palette8[internal] - AssertionError: [{'...
ERROR src/img2pdf_test.py::test_tiff_palette8[pikepdf] - AssertionError: [{'v...
================ 259 passed, 10 deselected, 32 errors in 54.52s ================

https://kojipkgs.fedoraproject.org//work/tasks/1918/96531918/build.log

That means the 'endianess' is always reported as MSB instead of the expected LSB.

I haven't looked at it in detail, but it's a bit curious since - although it rund on the nowadays esoteric PPC architecture - it's running in PPC little-endian mode.

Ok, I added the following patch to fix the ValueError: ``` --- a/src/img2pdf_test.py 2023-01-22 18:36:32.208977359 +0100 +++ b/src/img2pdf_test.py 2023-01-22 18:39:52.918531386 +0100 @@ -345,7 +345,7 @@ stderr=subprocess.PIPE, ).stderr assert psnr != b"0" - psnr = float(psnr.strip(b"0")) + psnr = float(psnr.split()[0]) assert psnr != 0 # or otherwise we would use the exact variant assert psnr > 50 @@ -501,7 +501,7 @@ stderr=subprocess.PIPE, ).stderr assert psnr != b"0" - psnr = float(psnr.strip(b"0")) + psnr = float(psnr.split()[0]) assert psnr != 0 # or otherwise we would use the exact variant assert psnr > 50 (tmpdir / "images-000.png").unlink() ``` The still failing tests can then be selected by the following pytest expression (`-k`): ``` jpg_cmyk or png_gray16[ or tiff_cmyk8 or tiff_rgb12 or tiff_rgb14' ``` I also tested it on Fedora 37 (i.e. still ImageMagick-6.9.12.70-1.fc37.x86_64) and there the following tests also fail: ``` ImageMagick-6.9.12.70-1.fc37.x86_64 ``` --- In addition to that, some additional test cases fail when running them on PPC64LE. (The Fedora build system builds noarch Python packages such as img2pdf not on all supported architectures, but picks a build server basically by chance - thus the tests run on rather niche architectures, only from time to time.) ``` _________________ ERROR at setup of test_tiff_float[internal] __________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fff7ff9eb10>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0')) tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png') @pytest.fixture(scope="session") def tiff_float_img(tmp_path_factory, tmp_normal_png): in_img = tmp_path_factory.mktemp("tiff_float_img") / "in.tiff" subprocess.check_call( CONVERT + [ str(tmp_normal_png), "-depth", "32", "-define", "quantum:format=floating-point", str(in_img), ] ) identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was # put into an array, here we cater for the older version containing just # the bare dictionary if "image" in identify: identify = [identify] assert "image" in identify[0] assert identify[0]["image"].get("format") == "TIFF", str(identify) assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify) assert identify[0]["image"].get("geometry") == { "width": 60, "height": 60, "x": 0, "y": 0, }, str(identify) assert identify[0]["image"].get("colorspace") == "sRGB", str(identify) assert identify[0]["image"].get("type") == "TrueColor", str(identify) endian = "endianess" if identify[0].get("version", "0") < "1.0" else "endianness" > assert identify[0]["image"].get(endian) in ["Undefined", "LSB",], str( identify ) # FIXME: should be LSB E AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_float_img0/in.tiff', 'baseName': 'in.tiff', 'permissions': 644, 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'MSB', 'colorspace': 'sRGB', 'depth': 8, 'baseDepth': 32, 'channelDepth': {'red': 8, 'green': 8, 'blue': 1}, 'pixels': 10800, 'imageStatistics': {'Overall': {'min': 0, 'max': 65535, 'mean': 19055.6, 'median': 0, 'standardDeviation': 27243.5, 'kurtosis': -1.00126, 'skewness': 0.915343, 'entropy': 0.460859}}, 'channelStatistics': {'red': {'min': 0, 'max': 65535, 'mean': 19057.6, 'median': 0, 'standardDeviation': 27236.4, 'kurtosis': -1.0011, 'skewness': 0.915359, 'entropy': 0.462046}, 'green': {'min': 0, 'max': 65535, 'mean': 19088.9, 'median': 0, 'standardDeviation': 27257.5, 'kurtosis': -1.00686, 'skewness': 0.912479, 'entropy': 0.460981}, 'blue': {'min': 0, 'max': 65535, 'mean': 19020.4, 'median': 0, 'standardDeviation': 27236.6, 'kurtosis': -0.998009, 'skewness': 0.917431, 'entropy': 0.459548}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'None', 'orientation': 'TopLeft', 'properties': {'quantum:format': 'floating-point', 'signature': '347da9cc530cc040b2818b07e399104f8cd8dd42a484eb9524b0ba9970fb8cd2', 'tiff:alpha': 'unspecified', 'tiff:endian': 'msb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '11'}, 'tainted': False, 'filesize': '43530B', 'numberPixels': '3600', 'pixelsPerSecond': '4.14129MB', 'userTime': '0.000u', 'elapsedTime': '0:01.000', 'version': 'ImageMagick 7.1.0-57 (Beta) Q16-HDRI powerpc64le 20701 https://imagemagick.org'}}] E assert 'MSB' in ['Undefined', 'LSB'] E + where 'MSB' = <built-in method get of dict object at 0x7fff7ce76580>('endianness') E + where <built-in method get of dict object at 0x7fff7ce76580> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 32, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get src/img2pdf_test.py:2316: AssertionError [..] =========================== short test summary info ============================ ERROR src/img2pdf_test.py::test_tiff_float[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_float[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_cmyk16[internal] - AssertionError: [{'ve... ERROR src/img2pdf_test.py::test_tiff_cmyk16[pikepdf] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_rgb8[internal] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_rgb8[pikepdf] - AssertionError: [{'versi... ERROR src/img2pdf_test.py::test_tiff_rgb16[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_rgb16[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_rgba8[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_rgba8[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_rgba16[internal] - AssertionError: [{'ve... ERROR src/img2pdf_test.py::test_tiff_rgba16[pikepdf] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_gray1[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_gray1[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_gray2[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_gray2[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_gray4[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_gray4[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_gray8[internal] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_gray8[pikepdf] - AssertionError: [{'vers... ERROR src/img2pdf_test.py::test_tiff_gray16[internal] - AssertionError: [{'ve... ERROR src/img2pdf_test.py::test_tiff_gray16[pikepdf] - AssertionError: [{'ver... ERROR src/img2pdf_test.py::test_tiff_multipage[internal] - AssertionError: [{... ERROR src/img2pdf_test.py::test_tiff_multipage[pikepdf] - AssertionError: [{'... ERROR src/img2pdf_test.py::test_tiff_palette1[internal] - AssertionError: [{'... ERROR src/img2pdf_test.py::test_tiff_palette1[pikepdf] - AssertionError: [{'v... ERROR src/img2pdf_test.py::test_tiff_palette2[internal] - AssertionError: [{'... ERROR src/img2pdf_test.py::test_tiff_palette2[pikepdf] - AssertionError: [{'v... ERROR src/img2pdf_test.py::test_tiff_palette4[internal] - AssertionError: [{'... ERROR src/img2pdf_test.py::test_tiff_palette4[pikepdf] - AssertionError: [{'v... ERROR src/img2pdf_test.py::test_tiff_palette8[internal] - AssertionError: [{'... ERROR src/img2pdf_test.py::test_tiff_palette8[pikepdf] - AssertionError: [{'v... ================ 259 passed, 10 deselected, 32 errors in 54.52s ================ ``` https://kojipkgs.fedoraproject.org//work/tasks/1918/96531918/build.log That means the 'endianess' is always reported as `MSB` instead of the expected `LSB`. I haven't looked at it in detail, but it's a bit curious since - although it rund on the nowadays esoteric PPC architecture - it's running in PPC little-endian mode.
Owner

The ValueError part of this issue should be fixed by 57d7e07e6b

Can you confirm?

The ValueError part of this issue should be fixed by 57d7e07e6badb252c12015388b58fcb5285d3158 Can you confirm?
Owner

The endianness problems also occurred on s380x (also big endian) and were fixed in 33139612f8

The endianness problems also occurred on s380x (also big endian) and were fixed in 33139612f85d8e638b759603957ebf62cce46d80
josch closed this issue 2023-06-11 12:46:15 +00:00
Author

I'm afraid the endianess issue is more involved than it seems and thus the s390x fix isn't sufficient:

https://github.com/ImageMagick/ImageMagick/issues/6300

tl;dr: IM7 currently creates big-endian byte order TIFFs on non x86 archs by default, i.e. little-endian ones! And the IM plan is to even switch to write litte-endian TIFFs on all archs, by default.

So if the TIFF byte order is important to img2pdf perhaps it makes sense to explicitly specify it via an ImageMagick command line option.

I'm afraid the endianess issue is more involved than it seems and thus the s390x fix isn't sufficient: https://github.com/ImageMagick/ImageMagick/issues/6300 tl;dr: IM7 currently creates big-endian byte order TIFFs on non x86 archs by default, i.e. little-endian ones! And the IM plan is to even switch to write litte-endian TIFFs on all archs, by default. So if the TIFF byte order is important to img2pdf perhaps it makes sense to explicitly specify it via an ImageMagick command line option.
Owner

Oh dear...

Okay, but the commit I referenced above is sufficient to fix this issue right now, correct? Though it will break in the future once IM7 decides to write little-endian TIFF on all arches.

TIFF byte order is not always important but it sometimes is. For the cases where it is, the test suite creates them by passing -define tiff:endian=msb -define tiff:fill-order=msb or -define tiff:endian=lsb -define tiff:fill-order=lsb to imagemagick. Those are the only cases where checking the byte order for the correct values is crucial.

Oh dear... Okay, but the commit I referenced above is sufficient to fix this issue *right now*, correct? Though it will break in the future once IM7 decides to write little-endian TIFF on all arches. TIFF byte order is not always important but it sometimes is. For the cases where it is, the test suite creates them by passing `-define tiff:endian=msb -define tiff:fill-order=msb` or `-define tiff:endian=lsb -define tiff:fill-order=lsb` to imagemagick. Those are the only cases where checking the byte order for the correct values is crucial.
Author

Okay, but the commit I referenced above is sufficient to fix this issue right now, correct?

No, unfortunately, it's not.

Currently, I'm working around it in the Fedora rawhide builds like this:

sed -i -e 's/in \["Undefined", "LSB",\]/ in \["Undefined", "LSB", "MSB"\]/' -e 's/("tiff:endian") == "lsb"/("tiff:endian") in ("lsb", "msb",)/' src/img2pdf_test.py

Otherwise the build fails on aarch64 and ppc64le, which are little-endian architectures - because current IM7 thinks they are big-endian and the img2pdf tests correctly detect the host as little-endian.

IIRC, I even did try to add a IM convert option for explicitly selecting the TIFF byte order, but this lead to other failed assertions.

NB: s390x is big-endian, and probably the last architecture that isn't completely dead, yet.

NB: On Fedora, a Python package like img2pdf is a so called noarch package and thus it's build on one of the supported target archs, by chance - i.e. not on all of them.
Thus, it sometimes takes a few builds before noticing such issues. However, it's also possible to explicitly build a package on a certain arch for testing, and this is what I did after I noticed these issues.

> Okay, but the commit I referenced above is sufficient to fix this issue right now, correct? No, unfortunately, it's not. Currently, I'm working around it in the Fedora rawhide builds like this: ``` sed -i -e 's/in \["Undefined", "LSB",\]/ in \["Undefined", "LSB", "MSB"\]/' -e 's/("tiff:endian") == "lsb"/("tiff:endian") in ("lsb", "msb",)/' src/img2pdf_test.py ``` Otherwise the build fails on aarch64 and ppc64le, which are little-endian architectures - because current IM7 thinks they are big-endian and the img2pdf tests correctly detect the host as little-endian. IIRC, I even did try to add a IM convert option for explicitly selecting the TIFF byte order, but this lead to other failed assertions. NB: s390x is big-endian, and probably the last architecture that isn't completely dead, yet. NB: On Fedora, a Python package like img2pdf is a so called noarch package and thus it's build on one of the supported target archs, by chance - i.e. not on all of them. Thus, it sometimes takes a few builds before noticing such issues. However, it's also possible to explicitly build a package on a certain arch for testing, and this is what I did after I noticed these issues.
Owner

ah then this is an IM7 issue because i tested the current git HEAD on Debian with IM6 and the tests work fine on aarch64, ppc64el as well as s390x.

can i prepare another patch for you which completely removes the byte-order check for those tests where it doesn't matter so that you can test this with fedora IM7 on those architectures?

ah then this is an IM7 issue because i tested the current git HEAD on Debian with IM6 and the tests work fine on aarch64, ppc64el as well as s390x. can i prepare another patch for you which completely removes the byte-order check for those tests where it doesn't matter so that you can test this with fedora IM7 on those architectures?
josch reopened this issue 2023-06-13 01:45:49 +00:00
Author

Yes, I can test such a patch.

Yes, I can test such a patch.
Owner

Excellent, thank you! Here it is:

https://paste.debian.net/hidden/355d54e1/

This skips the endianness check for all images where img2pdf should not care.

Excellent, thank you! Here it is: https://paste.debian.net/hidden/355d54e1/ This skips the endianness check for all images where img2pdf should not care.
Author

Sorry, it took me some time to get back to this.

Unfortunately, debian pastebin has already removed the patch, it seems.

Can you post it again, e.g. perhaps attach it to this issue?

Sorry, it took me some time to get back to this. Unfortunately, debian pastebin has already removed the patch, it seems. Can you post it again, e.g. perhaps attach it to this issue?
Owner

Thank you, attached! 😄

Thank you, attached! 😄
Author

Hm, the patch doesn't apply on top of 0.4.4.

Hm, the patch doesn't apply on top of 0.4.4.
Author

Ok, I've did a scratch build on aarch64 with the current main branch and that patch on top:

https://kojipkgs.fedoraproject.org//work/tasks/3250/103743250/build.log

AFAICS, the endian errors are gone, but there are some other errors and failures.

There seem to be 2 causes:

  1. the baseType being None
  2. /usr/share/color/icc/sRGB.icc not being available

Examples:

_________________ ERROR at setup of test_miff_cmyk8[internal] __________________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all')
tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png')
    @pytest.fixture(scope="session")
    def miff_cmyk8_img(tmp_path_factory, tmp_normal_png):
        in_img = tmp_path_factory.mktemp("miff_cmyk8") / "in.miff"
        subprocess.check_call(
            CONVERT
            + [
                str(tmp_normal_png),
                "-colorspace",
                "cmyk",
                str(in_img),
            ]
        )
        identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"]))
        assert len(identify) == 1
        # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was
        # put into an array, here we cater for the older version containing just
        # the bare dictionary
        if "image" in identify:
            identify = [identify]
        assert "image" in identify[0]
        assert identify[0]["image"].get("format") == "MIFF", str(identify)
        assert identify[0]["image"].get("class") == "DirectClass"
>       assert identify[0]["image"].get("baseType") == "ColorSeparation"
E       AssertionError: assert None == 'ColorSeparation'
E        +  where None = <built-in method get of dict object at 0xffffb0e2b500>('baseType')
E        +    where <built-in method get of dict object at 0xffffb0e2b500> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 8, 'baseName': 'in.miff', 'borderColor': '#DFDFDFDFDFDF', ...}.get
src/img2pdf_test.py:3805: AssertionError
__________________ ERROR at setup of test_miff_rgb8[internal] __________________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all')
tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png')
    @pytest.fixture(scope="session")
    def miff_rgb8_img(tmp_path_factory, tmp_normal_png):
        in_img = tmp_path_factory.mktemp("miff_rgb8") / "in.miff"
        subprocess.check_call(CONVERT + [str(tmp_normal_png), str(in_img)])
        identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"]))
        assert len(identify) == 1
        # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was
        # put into an array, here we cater for the older version containing just
        # the bare dictionary
        if "image" in identify:
            identify = [identify]
        assert "image" in identify[0]
        assert identify[0]["image"].get("format") == "MIFF", str(identify)
        assert identify[0]["image"].get("class") == "DirectClass"
>       assert identify[0]["image"].get("baseType") == "TrueColor"
E       AssertionError: assert None == 'TrueColor'
E        +  where None = <built-in method get of dict object at 0xffffb255a740>('baseType')
E        +    where <built-in method get of dict object at 0xffffb255a740> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 8, 'baseName': 'in.miff', 'borderColor': '#DFDFDFDFDFDF', ...}.get
src/img2pdf_test.py:3884: AssertionError
__________ test_date[internal-2021-02-05 17:49:00-Europe/Berlin-True] __________
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all')
jpg_img = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/jpg0/in.jpg')
engine = 'internal', testdata = '2021-02-05 17:49:00'
timezone = 'Europe/Berlin', pdfa = True
    @pytest.mark.parametrize(
        "engine,testdata,timezone,pdfa",
        itertools.product(
            ["internal", "pikepdf"],
            [
                "2021-02-05 17:49:00",
                "2021-02-05T17:49:00",
                "Fri, 05 Feb 2021 17:49:00 +0100",
                "last year 12:00",
            ],
            ["Europe/Berlin", "GMT+12"],
            [True, False],
        ),
    )
    def test_date(tmp_path_factory, jpg_img, engine, testdata, timezone, pdfa):
        # we use the date utility to convert the timestamp from the local
        # timezone into UTC with the format used by PDF
        expected = tz2utcstrftime(testdata, "D:%Y%m%d%H%M%SZ", timezone)
        out_pdf = tmp_path_factory.mktemp("faketime") / "out.pdf"
>       subprocess.check_call(
            ["env", f"TZ={timezone}", img2pdfprog]
            + (["--pdfa"] if pdfa else [])
            + [
                f"--moddate={testdata}",
                f"--creationdate={testdata}",
                "--producer=",
                "--engine=" + engine,
                "--output=" + str(out_pdf),
                str(jpg_img),
            ]
        )
src/img2pdf_test.py:6775: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
popenargs = (['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', ...],)
kwargs = {}, retcode = 1
cmd = ['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', ...]
    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', '--producer=', '--engine=internal', '--output=/tmp/pytest-of-mockbuild/pytest-0/faketime0/out.pdf', '/tmp/pytest-of-mockbuild/pytest-0/jpg0/in.jpg']' returned non-zero exit status 1.
/usr/lib64/python3.12/subprocess.py:413: CalledProcessError
----------------------------- Captured stderr call -----------------------------
error: [Errno 2] No such file or directory: '/usr/share/color/icc/sRGB.icc'

On Fedora there doesn't seem to be a package that provides that exact path.

However, there is colord which provides /usr/share/color/icc/colord/sRGB.icc, icc-profiles-openicc which provides /usr/share/color/icc/OpenICC/sRGB.icc, among others.

Ok, I've did a scratch build on aarch64 with the current main branch and that patch on top: https://kojipkgs.fedoraproject.org//work/tasks/3250/103743250/build.log AFAICS, the endian errors are gone, but there are some other errors and failures. There seem to be 2 causes: 1. the `baseType` being `None` 2. `/usr/share/color/icc/sRGB.icc` not being available Examples: ``` _________________ ERROR at setup of test_miff_cmyk8[internal] __________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all') tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png') @pytest.fixture(scope="session") def miff_cmyk8_img(tmp_path_factory, tmp_normal_png): in_img = tmp_path_factory.mktemp("miff_cmyk8") / "in.miff" subprocess.check_call( CONVERT + [ str(tmp_normal_png), "-colorspace", "cmyk", str(in_img), ] ) identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was # put into an array, here we cater for the older version containing just # the bare dictionary if "image" in identify: identify = [identify] assert "image" in identify[0] assert identify[0]["image"].get("format") == "MIFF", str(identify) assert identify[0]["image"].get("class") == "DirectClass" > assert identify[0]["image"].get("baseType") == "ColorSeparation" E AssertionError: assert None == 'ColorSeparation' E + where None = <built-in method get of dict object at 0xffffb0e2b500>('baseType') E + where <built-in method get of dict object at 0xffffb0e2b500> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 8, 'baseName': 'in.miff', 'borderColor': '#DFDFDFDFDFDF', ...}.get src/img2pdf_test.py:3805: AssertionError ``` ``` __________________ ERROR at setup of test_miff_rgb8[internal] __________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all') tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png') @pytest.fixture(scope="session") def miff_rgb8_img(tmp_path_factory, tmp_normal_png): in_img = tmp_path_factory.mktemp("miff_rgb8") / "in.miff" subprocess.check_call(CONVERT + [str(tmp_normal_png), str(in_img)]) identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"])) assert len(identify) == 1 # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was # put into an array, here we cater for the older version containing just # the bare dictionary if "image" in identify: identify = [identify] assert "image" in identify[0] assert identify[0]["image"].get("format") == "MIFF", str(identify) assert identify[0]["image"].get("class") == "DirectClass" > assert identify[0]["image"].get("baseType") == "TrueColor" E AssertionError: assert None == 'TrueColor' E + where None = <built-in method get of dict object at 0xffffb255a740>('baseType') E + where <built-in method get of dict object at 0xffffb255a740> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 8, 'baseName': 'in.miff', 'borderColor': '#DFDFDFDFDFDF', ...}.get src/img2pdf_test.py:3884: AssertionError ``` ``` __________ test_date[internal-2021-02-05 17:49:00-Europe/Berlin-True] __________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0xffffb3d61cd0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all') jpg_img = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/jpg0/in.jpg') engine = 'internal', testdata = '2021-02-05 17:49:00' timezone = 'Europe/Berlin', pdfa = True @pytest.mark.parametrize( "engine,testdata,timezone,pdfa", itertools.product( ["internal", "pikepdf"], [ "2021-02-05 17:49:00", "2021-02-05T17:49:00", "Fri, 05 Feb 2021 17:49:00 +0100", "last year 12:00", ], ["Europe/Berlin", "GMT+12"], [True, False], ), ) def test_date(tmp_path_factory, jpg_img, engine, testdata, timezone, pdfa): # we use the date utility to convert the timestamp from the local # timezone into UTC with the format used by PDF expected = tz2utcstrftime(testdata, "D:%Y%m%d%H%M%SZ", timezone) out_pdf = tmp_path_factory.mktemp("faketime") / "out.pdf" > subprocess.check_call( ["env", f"TZ={timezone}", img2pdfprog] + (["--pdfa"] if pdfa else []) + [ f"--moddate={testdata}", f"--creationdate={testdata}", "--producer=", "--engine=" + engine, "--output=" + str(out_pdf), str(jpg_img), ] ) src/img2pdf_test.py:6775: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ popenargs = (['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', ...],) kwargs = {}, retcode = 1 cmd = ['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', ...] def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute. The arguments are the same as for the call function. Example: check_call(["ls", "-l"]) """ retcode = call(*popenargs, **kwargs) if retcode: cmd = kwargs.get("args") if cmd is None: cmd = popenargs[0] > raise CalledProcessError(retcode, cmd) E subprocess.CalledProcessError: Command '['env', 'TZ=Europe/Berlin', 'src/img2pdf.py', '--pdfa', '--moddate=2021-02-05 17:49:00', '--creationdate=2021-02-05 17:49:00', '--producer=', '--engine=internal', '--output=/tmp/pytest-of-mockbuild/pytest-0/faketime0/out.pdf', '/tmp/pytest-of-mockbuild/pytest-0/jpg0/in.jpg']' returned non-zero exit status 1. /usr/lib64/python3.12/subprocess.py:413: CalledProcessError ----------------------------- Captured stderr call ----------------------------- error: [Errno 2] No such file or directory: '/usr/share/color/icc/sRGB.icc' ``` On Fedora there doesn't seem to be a package that provides that exact path. However, there is colord which provides `/usr/share/color/icc/colord/sRGB.icc`, icc-profiles-openicc which provides `/usr/share/color/icc/OpenICC/sRGB.icc`, among others.
Owner

Thank you for your tests! For what it's worth, my own computer is also an arm64 machine, so it is more likely for architecture specific problems on amd64/x86_64 to creep up because I don't have an intel machine at home anymore. The remaining problems are specific to imagemagick and fedora.

the baseType being None

Oh no... this sounds like imagemagick changed one of the key names in its json output again without bumping the format version... Could you run this command on some true-color and have a look in the output what the new name of the key is that has the "TrueColor" value?

convert truecolor.jpg json:

/usr/share/color/icc/sRGB.icc not being available. On Fedora there doesn't seem to be a package that provides that exact path. However, there is colord which provides /usr/share/color/icc/colord/sRGB.icc, icc-profiles-openicc which provides /usr/share/color/icc/OpenICC/sRGB.icc, among others.

I recently added this commit:

29921eeabd

It tries to see if some common locations for sRGB.icc are available and picks the first one. Is one location that is used in Fedora missing from that list?

Thanks!

Thank you for your tests! For what it's worth, my own computer is also an arm64 machine, so it is more likely for architecture specific problems on amd64/x86_64 to creep up because I don't have an intel machine at home anymore. The remaining problems are specific to imagemagick and fedora. > the baseType being None Oh no... this sounds like imagemagick changed one of the key names in its json output **again** without bumping the format version... Could you run this command on some true-color and have a look in the output what the new name of the key is that has the "TrueColor" value? convert truecolor.jpg json: > /usr/share/color/icc/sRGB.icc not being available. On Fedora there doesn't seem to be a package that provides that exact path. However, there is colord which provides /usr/share/color/icc/colord/sRGB.icc, icc-profiles-openicc which provides /usr/share/color/icc/OpenICC/sRGB.icc, among others. I recently added this commit: https://gitlab.mister-muffin.de/josch/img2pdf/commit/29921eeabde1a2f9eb31f1383e5a820d9772c333 It tries to see if some common locations for sRGB.icc are available and picks the first one. Is one location that is used in Fedora missing from that list? Thanks!
josch added the
question
label 2023-08-03 18:06:51 +00:00
josch closed this issue 2023-08-05 12:43:45 +00:00
Owner

I just pushed a commit with the patch I attached in an earlier message.

This does not yet fix the baseType bug (I need to know what you get when you run convert truecolor.jpg json: to fix this) and it doesn't fix the sRGB.icc path issue (probably we just need to add the Fedora specific path to the list).

@gms do you think you will manage to look into those two things soon? Otherwise I'll just do another release first. Thanks!

I just pushed a commit with the patch I attached in an earlier message. This does not yet fix the baseType bug (I need to know what you get when you run `convert truecolor.jpg json:` to fix this) and it doesn't fix the sRGB.icc path issue (probably we just need to add the Fedora specific path to the list). @gms do you think you will manage to look into those two things soon? Otherwise I'll just do another release first. Thanks!
Author

Could you run this command on some true-color and have a look in the output what the new name of the key is that has the "TrueColor" value?

Sure, this is from a Fedora 38 system:

$ convert --version | head -1
Version: ImageMagick 7.1.1-11 Q16-HDRI x86_64 21206 https://imagemagick.org
$ curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png
$ ln -s 16777216colors.png truecolor.jpg
$ convert truecolor.jpg json: | grep -i true
    "name": "truecolor.jpg",
    "baseName": "truecolor.jpg",
    "type": "TrueColor",
      "png:IHDR.color_type": "2 (Truecolor)",

Vs. Fedora 37:

$ convert --version | head -1
Version: ImageMagick 6.9.12-86 Q16 x86_64 17814 https://legacy.imagemagick.org
[..]
$ convert truecolor.jpg json: | grep -i true
    "name": "truecolor.jpg",
    "type": "TrueColor",
      "png:IHDR.color_type": "2 (Truecolor)",
      "filename": "truecolor.jpg"

Which have same key, it looks.
I'll also check current Fedora Rawhide in a minute.


Is one [of the ICC profile] location that is used in Fedora missing from that list?

Fedora has /usr/share/color/icc/OpenICC/sRGB.icc and /usr/share/color/icc/colord/sRGB.icc via icc-profiles-openicc and colord. However, I'll have to explicitly declare one of them as build dependency because otherwise the package/profile isn't available in the build chroot. I'll add icc-profiles-openicc as build dependency.

> Could you run this command on some true-color and have a look in the output what the new name of the key is that has the "TrueColor" value? Sure, this is from a Fedora 38 system: ``` $ convert --version | head -1 Version: ImageMagick 7.1.1-11 Q16-HDRI x86_64 21206 https://imagemagick.org $ curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png $ ln -s 16777216colors.png truecolor.jpg $ convert truecolor.jpg json: | grep -i true "name": "truecolor.jpg", "baseName": "truecolor.jpg", "type": "TrueColor", "png:IHDR.color_type": "2 (Truecolor)", ``` Vs. Fedora 37: ``` $ convert --version | head -1 Version: ImageMagick 6.9.12-86 Q16 x86_64 17814 https://legacy.imagemagick.org [..] $ convert truecolor.jpg json: | grep -i true "name": "truecolor.jpg", "type": "TrueColor", "png:IHDR.color_type": "2 (Truecolor)", "filename": "truecolor.jpg" ``` Which have same key, it looks. I'll also check current Fedora Rawhide in a minute. --- > Is one [of the ICC profile] location that is used in Fedora missing from that list? Fedora has `/usr/share/color/icc/OpenICC/sRGB.icc` and `/usr/share/color/icc/colord/sRGB.icc` via icc-profiles-openicc and colord. However, I'll have to explicitly declare one of them as build dependency because otherwise the package/profile isn't available in the build chroot. I'll add icc-profiles-openicc as build dependency.
Author

The ImageMagick verison isn't much newer on Rawhide and yields the same results AFAICS:

$ rpm -q ImageMagick
ImageMagick-7.1.1.13-2.fc39.x86_64
$ convert --version | head -1
Version: ImageMagick 7.1.1-13 Q16-HDRI x86_64 21276 https://imagemagick.org
$ curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png
$ ln -s 16777216colors.png truecolor.jpg
$ convert truecolor.jpg json: | grep -i true
    "name": "truecolor.jpg",
    "baseName": "truecolor.jpg",
    "type": "TrueColor",
      "png:IHDR.color_type": "2 (Truecolor)",

I don't know if this helps and how good the podman experience is on debian, but this is a simple way to locally try out userspace on Fedora Rawhide:

podman run -it --rm quay.io/fedora/fedora:rawhide
The ImageMagick verison isn't much newer on Rawhide and yields the same results AFAICS: ``` $ rpm -q ImageMagick ImageMagick-7.1.1.13-2.fc39.x86_64 $ convert --version | head -1 Version: ImageMagick 7.1.1-13 Q16-HDRI x86_64 21276 https://imagemagick.org $ curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png $ ln -s 16777216colors.png truecolor.jpg $ convert truecolor.jpg json: | grep -i true "name": "truecolor.jpg", "baseName": "truecolor.jpg", "type": "TrueColor", "png:IHDR.color_type": "2 (Truecolor)", ``` --- I don't know if this helps and how good the podman experience is on debian, but this is a simple way to locally try out userspace on Fedora Rawhide: ``` podman run -it --rm quay.io/fedora/fedora:rawhide ```
Owner

Fedora has /usr/share/color/icc/OpenICC/sRGB.icc and /usr/share/color/icc/colord/sRGB.icc via icc-profiles-openicc and colord. However, I'll have to explicitly declare one of them as build dependency because otherwise the package/profile isn't available in the build chroot. I'll add icc-profiles-openicc as build dependency.

Hrm... odd that it doesn't work for you then. Commit 29921eeabd added both these paths to the search paths and will pick up the first one it finds.

podman run -it --rm quay.io/fedora/fedora:rawhide

I heard that other Debian people successfully are using podman. could you give me a command to run that installs all the runtime dependencies of img2pdf once i'm inside that container? Thanks!

> Fedora has /usr/share/color/icc/OpenICC/sRGB.icc and /usr/share/color/icc/colord/sRGB.icc via icc-profiles-openicc and colord. However, I'll have to explicitly declare one of them as build dependency because otherwise the package/profile isn't available in the build chroot. I'll add icc-profiles-openicc as build dependency. Hrm... odd that it doesn't work for you then. Commit 29921eeabde1a2f9eb31f1383e5a820d9772c333 added both these paths to the search paths and will pick up the first one it finds. > podman run -it --rm quay.io/fedora/fedora:rawhide I heard that other Debian people successfully are using podman. could you give me a command to run that installs all the runtime dependencies of img2pdf once i'm inside that container? Thanks!
Author

Hrm... odd that it doesn't work for you then.

It should work. It's just that I wasn't aware of this change and I thus hadn't modified the build dependencies. Thus, all the builds until now executed in a build environment that didn't include any of the mentioned dependencies.

For sure with the next revision I'll push I'll add that icc-profiles-openicc dependency.


You can install dependencies via:

dnf builddep python3-img2pdf

Currently, this pulls in 211 MiBs or so of RPMs, in a fresh container.

Note that the --rm switch automatically removes the container after exiting the shell, which might be unexpected and/or unwanted for some work.

> Hrm... odd that it doesn't work for you then. It should work. It's just that I wasn't aware of this change and I thus hadn't modified the build dependencies. Thus, all the builds until now executed in a build environment that didn't include any of the mentioned dependencies. For sure with the next revision I'll push I'll add that icc-profiles-openicc dependency. --- You can install dependencies via: ``` dnf builddep python3-img2pdf ``` Currently, this pulls in 211 MiBs or so of RPMs, in a fresh container. Note that the `--rm` switch automatically removes the container after exiting the shell, which might be unexpected and/or unwanted for some work.
Owner

Thank you, I'm able to reproduce the problem with rawhide inside podman:

podman run -it --rm quay.io/fedora/fedora:rawhide
[...]
# dnf install ImageMagick
# curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png
# convert 16777216colors.png 16777216colors.miff
# convert 16777216colors.miff json: | grep -i true
    "type": "TrueColor",
      "png:IHDR.color_type": "2 (Truecolor)",
Thank you, I'm able to reproduce the problem with rawhide inside podman: ``` podman run -it --rm quay.io/fedora/fedora:rawhide [...] # dnf install ImageMagick # curl -O https://upload.wikimedia.org/wikipedia/commons/e/e9/16777216colors.png # convert 16777216colors.png 16777216colors.miff # convert 16777216colors.miff json: | grep -i true "type": "TrueColor", "png:IHDR.color_type": "2 (Truecolor)", ```
Owner

Okay, e05580a49a fixes the baseType problem. I can also confirm that installing icc-profiles-openicc makes the tests succeed that failed before.

Unfortunately, now new tests start failing. The ones I added because img2pdf now understands JPEG2000 files with transparency:

FAILED src/img2pdf_test.py::test_jpg_2000_rgba8[internal] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-...
FAILED src/img2pdf_test.py::test_jpg_2000_rgba8[pikepdf] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-...
FAILED src/img2pdf_test.py::test_jpg_2000_rgba16[internal] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-...
FAILED src/img2pdf_test.py::test_jpg_2000_rgba16[pikepdf] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-...

Sigh...

Okay, e05580a49a1d2cc2822dcd0d13b8386da6293e2b fixes the baseType problem. I can also confirm that installing `icc-profiles-openicc` makes the tests succeed that failed before. Unfortunately, now new tests start failing. The ones I added because img2pdf now understands JPEG2000 files with transparency: ``` FAILED src/img2pdf_test.py::test_jpg_2000_rgba8[internal] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-... FAILED src/img2pdf_test.py::test_jpg_2000_rgba8[pikepdf] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-... FAILED src/img2pdf_test.py::test_jpg_2000_rgba16[internal] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-... FAILED src/img2pdf_test.py::test_jpg_2000_rgba16[pikepdf] - subprocess.CalledProcessError: Command '['compare', '-metric', 'AE', '-alpha', 'off', '/tmp/pytest-of-root/pytest-... ``` Sigh...
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#152
No description provided.