strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.71k stars 298 forks source link

More iOS 18 format trouble - Non-existing depth image referenced #1213

Closed ltning closed 3 months ago

ltning commented 3 months ago

When attempting to identify (or otherwise work with) the attached file, I receive the following error. I'm running a build from commit 7a8c58e4be8b3eb77d82330a407a7f5e6da15a44 (couple days ago). The image is from iOS 18 developer beta 2.

MIME type: image/heic
main brand: heic
compatible brands: mif1, MiHB, MiHE, MiPr, miaf, heic, tmap
Could not read HEIF/AVIF file: Invalid input: Non-existing item ID referenced: Non-existing depth image referenced

Other images from iOS 18 on the same phone (but possibly from the 1st developer beta) work fine with this build (but did not with the latest official release, as detailed in #1190). img_2314.heic.zip

farindk commented 3 months ago

Fix is in: 3a6f8cdec345e467a538f7c728376fa2e5f3031c

The reason were depth (and alpha) images assigned to a non-image tmap item.

ltning commented 3 months ago

I can confirm this works; sorry about the delay - am attempting to vacation a bit :) Thank you!!

hackerfactor commented 2 months ago

Is this correct?

$ heif-info IMG_2314.HEIC
MIME type: image/heic
main brand: heic
compatible brands: mif1, MiHB, MiHE, MiPr, miaf, heic, tmap

Could not read HEIF/AVIF file: Invalid input: Unspecified: Too many auxiliary image references

I'm using:

libaom.so.3.9.1
libde265.so.0.1.8
libheif.so.1.18.0
libx265.so.209
farindk commented 2 months ago

Is this correct?

Seems strange. Can you attach the image?

hackerfactor commented 2 months ago

It's the same img_2314.heic.zip from above.

farindk commented 2 months ago

I don't get that. I get:

MIME type: image/heic
main brand: heic
compatible brands: mif1, MiHB, MiHE, MiPr, miaf, heic, tmap

image: 5712x4284 (id=46), primary
  colorspace: YCbCr, 4:2:0
  bit depth: 8
  thumbnail: 416x312
  color profile: prof
  alpha channel: no 
  depth channel: yes
    size: 768x576
    bits per pixel: 8
    z-near: undefined
    z-far:  undefined
    d-min:  0.528809
    d-max:  0.695312
    representation: uniform disparity
    disparity_reference_view: 0
metadata:
  Exif: 2876 bytes
  XMP: 1847 bytes
transformations:
  angle (ccw): 0
region annotations:
  none
properties:

Maybe you still have an old library version installed somewhere else that is used instead?

farindk commented 2 months ago

I get your output with v1.17.6, but not with v1.18.0.

hackerfactor commented 2 months ago

Ah, that was it. Lots of old versions in /usr/local/lib/. I deleted them and the problem went away. Odd that it was loading the wrong library.