Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax ImageQt roundtrip check #6913

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/test_qt_image_qapplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
warnings.simplefilter("ignore", category=DeprecationWarning)
from PIL import ImageQt

from .helper import assert_image_equal, assert_image_equal_tofile, hopper
from .helper import assert_image_equal_tofile, assert_image_similar, hopper

if ImageQt.qt_is_installed:
from PIL.ImageQt import QPixmap
Expand Down Expand Up @@ -48,7 +48,7 @@ def __init__(self):
def roundtrip(expected):
result = ImageQt.fromqpixmap(ImageQt.toqpixmap(expected))
# Qt saves all pixmaps as rgb
assert_image_equal(result, expected.convert("RGB"))
assert_image_similar(result, expected.convert("RGB"), 0.3)


@pytest.mark.skipif(not ImageQt.qt_is_installed, reason="Qt bindings are not installed")
Expand Down