Question: BMP FIlles: Windows BMP Files are a simple image file format. While there are multiple variations of them, we will be dealing specifically with 24-bit


BMP FIlles: Windows BMP Files are a simple image file format. While there are multiple variations of them, we will be dealing specifically with 24-bit files that do not have color space information. The file is laid out by having a 54 byte header followed by the pixels in RGB format. Most of the file header is not important to us. It contains information about the bit depth used for colors, optional color tables and other things. The only things we care about are the width and height, so we know how many pixels are in the file. If you read in the header as an array of 54 uint8 t, bytes 18-21 are the width and bytes 22-25 are the height. This can be extracted by the following code: int32-t int32-t width height *(static_cast
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
