From da7509f72a02c2f5f110878e6874afe537c0e856 Mon Sep 17 00:00:00 2001 From: Benjamin Wibking Date: Thu, 20 Jun 2024 05:47:04 +1000 Subject: [PATCH 1/3] convert images with PIL --- regtest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regtest.py b/regtest.py index c592dd1..8ebe374 100755 --- a/regtest.py +++ b/regtest.py @@ -1058,7 +1058,9 @@ def test_suite(argv): ppm_file = test_util.get_recent_filename(output_dir, "", ".ppm") if not ppm_file is None: png_file = ppm_file.replace(".ppm", ".png") - test_util.run(f"convert {ppm_file} {png_file}") + from PIL import Image + with Image.open(ppm_file) as im: + im.save(png_file) test.png_file = png_file # analysis From 85d6ecf5e527649f14a65d3dc30bcea3d726c5dd Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Thu, 20 Jun 2024 11:55:29 -0400 Subject: [PATCH 2/3] remove printf --- regtest.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/regtest.py b/regtest.py index 0f9110a..2ab62fb 100755 --- a/regtest.py +++ b/regtest.py @@ -789,8 +789,6 @@ def test_suite(argv): if not test.doComparison: test.compare_succesful = not test.crashed - print(f"at the top of the make_benchamrks: {test.doComparison=}, {args.make_benchmarks=}") - if args.make_benchmarks is None and test.doComparison: suite.log.log("doing the comparison...") @@ -911,8 +909,6 @@ def test_suite(argv): elif test.doComparison: # make_benchmarks - print("!!!!!! here -- we should be making benchmarks") - if not compare_file == "": if not output_file == compare_file: From 3491b2f047db5bb915e6ba74a80ab8fb7e7fc306 Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Thu, 20 Jun 2024 11:56:46 -0400 Subject: [PATCH 3/3] add PIL to requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8ce531d..bf24963 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ matplotlib>=2.1.0 sphinx_rtd_theme Sphinx nbsphinx>=0.3.1 +pillow