I am trying to read the WebP image header, according to the WebP Container Specification of Extended File Format.
fun g
Don't know the Spec was incomplete or something, I logged the byte values and found a pattern somehow. And found that the dimensions are at 24-26 and 27-29 indexes.
val width = 1 + (get24bit(data, 24))
val height = 1 + (get24bit(data, 27))
This does the trick! Hopefully it is helpful to note this point as long as documentation is not updated.