I'm looking for a (fast) way to retrieve image metadata from an avif-file in my java-application. This is currently done for many image formats by analyzing the raw header bytes of a file.
I can recognize a file as avif through the magic byte sequence at the beginning of the file: ftypavif
.
But I'm not able to find any information how to parse the (max) image width & height of contained images. For JPEG2000 for example I can search for SIZ marker 0xFF51
and parse dimensions afterwards, but even after spending a lot of time reading through specifications of avif, I'm not able to find something similar for it.
Is my approach incorrect and I can't parse the image dimensions without decoding the image(s)? Or is there any documentation (or even usable library) I missed to retrieve width & height from an avif-file?
Any hints appreciated!