This is very nice.
If I had to nitpick something, I'd say choosing all-big-endian is kinda odd in 2021 but it's probably not a biggy even for something like this.
If I had to nitpick something, I'd say choosing all-big-endian is kinda odd in 2021 but it's probably not a biggy even for something like this.
The only places where it matters is the header's width/height and order of RGB(A) data. Storing RGBA as ABGR is not a great choice, imho. If you want to be endian independent, you have to read one byte at a time anyway (or swap).
Little endian would imply that RGBA is stored as A,B,G,R. Which was my argument against using LE for a file format.
LE vs BE would only affect multi-byte integers and floats, not arrays or structures of single-byte elements.