Skip to content

Conversation

@ClementPinard
Copy link

Make the ImageRegressionFixture compatible not only with bytes but also with direct PIL.Image.Image objects.

Most of the time when I use it, I have to convert my images to bytes only for them to be loaded back to PIL.

This PR tries to make it easier for people not familiar with bytes and image conversion

Clément and others added 3 commits December 16, 2025 18:20
Added release notes for version 2.9.0, including support for PIL.Image in ImageRegression.check.
@nicoddemus
Copy link
Member

Thanks @ClementPinard, appreciate the PR!

Could you please fix the tests? Thanks!

@nicoddemus
Copy link
Member

nicoddemus commented Dec 18, 2025

The parametrization in the test caused the expected files to change... could you fix that? Thanks!

@prusse-martin
Copy link

The parametrization in the test caused the expected files to change... could you fix that? Thanks!

Given the image data has not changed a simple image_regression.check(image_data, diff_threshold=1.0, basename='test_image_regression') would possibly work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants