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 jpg taken by iPhone 15 pro iOS18 #1190

Closed
tza17313 opened this issue Jun 17, 2024 · 9 comments
Closed

Unable to convert heic to jpg taken by iPhone 15 pro iOS18 #1190

tza17313 opened this issue Jun 17, 2024 · 9 comments

Comments

@tza17313
Copy link

I found that the heic format photos taken by iPhone15 pro under iOS18 cannot be converted to jpg by heif-convert

libheif version: 1.17.6

Here are some logs:

nero@d2c24395c402:/upload# heif-convert IMG_1159.HEIC 1.jpg
Could not read HEIF/AVIF file: Invalid input: Unspecified: Too many auxiliary image references

nero@d2c24395c402:/upload# heif-info IMG_1159.HEIC
MIME type: image/heic
main brand: heic
compatible brands: tmap, heic, mif1
Could not read HEIF/AVIF file: Invalid input: Unspecified: Too many auxiliary image references

When the iPhone 15 Pro system is still iOS17, the HEIC photos taken can be converted to JPG using the above command.

The file can be downloaded via the link below:

IMG_1159.zip

https://drive.google.com/file/d/1kEBvALrnM0EUwkQzsg8YL0Pwd8ZpRWWO/view?usp=sharing

@bradh
Copy link
Contributor

bradh commented Jun 17, 2024

Can you try with this branch: https://github.com/strukturag/libheif/tree/develop-v1.18.0 ?

I think I have that resolved by 58ba30d

@farindk
Copy link
Contributor

farindk commented Jun 17, 2024

With develop-v1.18.0, I get:

Could not read HEIF/AVIF file: Invalid input: Non-existing item ID referenced: Non-existing aux image referenced

Maybe the problem is that a referenced image is a tmap image.

@fxthomas
Copy link

fxthomas commented Jun 20, 2024

For reference: the tmap image is a derived image (more info about that HEIF feature here) that implements the upcoming ISO/CD 21496-1 standard which is meant to replace all the current incompatible/proprietary HDR gain map implementations.

It sounds like it's ignored by m_all_images in libheif/context.cc because the derived image type is not yet supported, but some other items reference it and make parsing fail.

I used GPAC/mp4box on one of the samples I have and I think at least the EXIF block reference both the primary image and the tmap -- I could be wrong, the structure is difficult to parse (mentally) as I'm not used to it.

@farindk
Copy link
Contributor

farindk commented Jun 20, 2024

Yes, we even have a pull request to add tmap support, but I didn't integrate it yet as nothing about the standard is public yet. Or I didn't find it. Adobe has removed all specific information from their website.

On the other hand, we should probably ignore all references that we cannot parse because there might be other extensions in the future that give rise to the same issue.

@farindk
Copy link
Contributor

farindk commented Jun 22, 2024

Fixes this. Gain map is not read yet.

@Ashok-Varma
Copy link

hi @farindk will this be added in next release cut?
any rough estimates on the next release cut?

@farindk
Copy link
Contributor

farindk commented Jul 6, 2024

Yes, it will be in the v1.18.0 release.
This will be released very soon.
(I'm still waiting for some other pieces of information on another part that I want to include in that release. )

@luohuide
Copy link

Please release it as soon as possible, IOS 18 photos require it.

@farindk
Copy link
Contributor

farindk commented Jul 10, 2024

v1.18.0 is released

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

No branches or pull requests

6 participants