An image file is considered to be CORRUPT (i.e., have an error) if… 0) File size does not match the file_size_bytes field. 1) Absence of padding in the pixel data. 2) Number of colors is not 0 or conflicts with other data in the header. 3) Padding size does not match my formula for what it should be. 4) Magic number is not present in bytes 0 and 1. 5) File size is off by one because a newline ('\n') was added by an editor 6) Bits per pixel is off, causing the file size to not match your prediction based on the other fields (and other effects). 7) Image data did not start from the lower left. 8) Wrong color space. 16-bit vs 24-bit. In later versions of BMP, alpha. 9) Calculation of image size, header size, file size # Disclaimer: Field names above may be approximate.