I am trying to get image width and height from JPEG XL file with C. I managed to get through the ISO containers and getting following structure. Size is size of a container in hexa, always 4 bytes. Name is following 4 bytes, and the there is offset where the container ends in the file, so payload is always at 8B + previous offset with various size.
size name offset
c JXL 12
14 ftyp 32
14 jxlp 52
2f7b jbrd 12207
1a63c jxlp 120299
Where my problem starts is that I was not able to find a good enough documentation. Only one I've found was from 2021 by which's logic the payload should start with: FF 0A then first following bit saying if it's a small image. However by trying to follow this logic; this payload from jxlp 00 00 00 00 ff 0a 32 2f 08 9a 80 48 should give me a small image as the first bit in 0x32 is zero. The image however is 1511 pixels tall.