bzotto / rgba_bitmap

"RGBA" : Specification (and C routines) for the dumbest, most useful bitmap image file format!
19 stars 3 forks source link

Length and CRC32 proposal #2

Closed ghost closed 1 year ago

ghost commented 1 year ago

I propose after before RGBA signature (for differs between version) add length value, and after image data add CRC32 checksum. And will align of 16 byte in header, and will one huge PNG chunk ever.

bzotto commented 1 year ago

I appreciate this suggestion! But I must politely refuse, in the name of simplicity. The length is implicit from the length and width fields, and requiring it separately would then require one more chunk of code to generate and validate it. A checksum is unnecessary except if targeting genuinely vintage systems or modes of transmission, where you're unlikely to be wanting this kind of grossly excessive storage format anyway! That said, nothing stopping you from adding these things to your own similar format if you need them!