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

Unable to convert HEIC to PNG #329

Open
Chhunneng opened this issue Jan 24, 2025 · 1 comment
Open

Unable to convert HEIC to PNG #329

Chhunneng opened this issue Jan 24, 2025 · 1 comment

Comments

@Chhunneng
Copy link

Describe the bug

I tried the image capture with an iPhone 15. It does not work.
https://github.com/Chhunneng/HEIC-test/raw/refs/heads/main/831d9610-fde3-4b0b-8d82-10f24e161c83.HEIC

Steps/Code to Reproduce

from PIL import Image, ImageOps
from pillow_heif import register_heif_opener, register_avif_opener
register_heif_opener()
register_avif_opener()

with Image.open("./test.heic") as image:
    fixed_image = ImageOps.exif_transpose(image)
    converted_image = fixed_image.convert("RGB")
    converted_image.save("test.png", format="PNG")

Expected Results

No error is throw

Actual Results

raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file './test.heic'

Versions

3.11.0 (main, Oct 17 2024, 11:17:17) [Clang 15.0.0 (clang-1500.1.0.2.5)]
macOS-14.5-arm64-arm-64bit
0.21.0
{'libheif': '1.19.5', 'HEIF': 'x265 HEVC encoder (4.0+1-6318f22)', 'AVIF': 'AOMedia Project AV1 Encoder 3.11.0', 'encoders': {'x265': 'x265 HEVC encoder (4.0+1-6318f22)', 'aom': 'AOMedia Project AV1 Encoder 3.11.0', 'mask': 'mask'}, 'decoders': {'libde265': 'libde265 HEVC decoder, version 1.0.15', 'aom': 'AOMedia Project AV1 Decoder 3.11.0'}}
@bigcat88
Copy link
Owner

Thanks for reporting this, I've created an issue in the libheif repository about it.

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

No branches or pull requests

2 participants