Skip to content

Commit

Permalink
Merge pull request #145 from BenWibking/convert-with-PIL
Browse files Browse the repository at this point in the history
convert images with PIL
  • Loading branch information
zingale authored Jun 20, 2024
2 parents 165c7ff + 3491b2f commit 466b340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ matplotlib>=2.1.0
sphinx_rtd_theme
Sphinx
nbsphinx>=0.3.1
pillow

0 comments on commit 466b340

Please sign in to comment.