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

libheif 1.19.7 #339

Merged
merged 1 commit into from
Mar 15, 2025
Merged

libheif 1.19.7 #339

merged 1 commit into from
Mar 15, 2025

Conversation

bigcat88
Copy link
Owner

Fixes #328

@pytest.mark.skipif(
    parse_version(pillow_heif.libheif_version()) < parse_version("1.19.7"), reason="Requires libheif 1.19.7."
)
def test_200_megapixels():
    with pytest.raises(RuntimeError):
        _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
    try:
        pillow_heif.options.DISABLE_SECURITY_LIMITS = True
        _ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
    finally:
        pillow_heif.options.DISABLE_SECURITY_LIMITS = False

With latest libheif this code works.

You can now simply disable the limits and get the behavior that was in the old libhaves before "1.19" versions

@bigcat88 bigcat88 force-pushed the libheif/1.19.7 branch 2 times, most recently from b93d084 to 917b0ea Compare March 15, 2025 08:52

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@bigcat88 bigcat88 merged commit 1a04787 into master Mar 15, 2025
25 checks passed
@bigcat88 bigcat88 deleted the libheif/1.19.7 branch March 15, 2025 09:11
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.

Unable to load Samsungs 200MP Images
1 participant