0xC0000054 / libheif-sharp

Provides .NET bindings for libheif.
https://0xc0000054.github.io/libheif-sharp/
GNU Lesser General Public License v3.0
61 stars 3 forks source link

Invalid input: No 'meta' box #7

Closed pol2095 closed 2 years ago

pol2095 commented 2 years ago

Hello,

libheif return for some pictures, this message error when I read avif : Invalid input: No 'meta' box

Thanks

0xC0000054 commented 2 years ago

libheif return for some pictures, this message error when I read avif :

Could you upload one of the images?

pol2095 commented 2 years ago

link to the avif image

I created this image on macOS using SDWebImageAVIFCoder I can open this image using GIMP on Windows

0xC0000054 commented 2 years ago

The file does have a 'meta' box, and I can open it in Photoshop.

I do not know why you are getting an error message, it may just be some kind of random glitch.

pol2095 commented 2 years ago

Can you open this file using libheif-sharp ? The problem occur with all files created on macOS. But I can open this file on Linux using libheif.

0xC0000054 commented 2 years ago

Can you open this file using libheif-sharp?

No, it fails with the missing 'meta' box error.

I found the issue, my file reading code was validating parameters in the wrong order. The output data pointer can be null for zero-byte reads.

pol2095 commented 2 years ago

Great job, it work, thanks.