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!

Some of the AVIF files have
ftypavis(contains animation) and I also saw AVIF withftypmif1If you want to parse AVIF alone, you need to understand ISOBMFF format and HEIF container first. There are various properties (like Image spatial Extents (ispe)), then various transformations (crop, rotation, mirror). Images can be stored in a form of image grid...