When saving a 24-bit BMP from Photohop I'm getting two '00' bytes at the end of the file. I can't see anything that accounts for this in the BMP spec. When I save the same image in MS Paint those two bytes are missing.
The extra bytes bring the total file size up to a multiple of 4 bytes. Is this Photoshop padding the BMP to ensure the whole file is 4-byte aligned? I know BMPs have padding per scan line, but this is not that. My test BMP is constructed such that there is no padding per scan line, and I've confirmed this in a hex editor. Just the two '00' bytes at the end of the file.
Just curios as it means InfoHeader->SizeImage is incorrect when dealing with the file exported from Photoshop. It's too large as it includes these extra bytes. Again, the same image exported from MS Paint doesn't include these. (Though paint isn't writing the InfoHeader->SizeImage property at all from what I can see!)
I've attached an image showing the same image saved as a 24-bit BMP through both MS Paint and Photoshop. Could anyone explain where these extra bytes come from? Thanks!