BMP Images for Windows

The Microsoft Windows Bitmap format (BMP) was developed for Windows/Intel computers, and is a convenient, simple, and widely used image file format for the Windows environment. The BMP format can store black-and-white binary images, 4-bit palette color images, 8-bit grayscale images, 8-bit palette color images, and 24-bit RGB color images.

The BMP header consists of two parts: the file header and the image header.

The file header is only 14 bytes long, and contains information necessary to open the image and load it into the computer's memory. The first two bytes are the characters BM to identify the file as a bitmap image; bytes 2 through 5 contain the file size in bytes; bytes 6 through 9 are reserved for future use; and bytes 10 through 13 contain the byte offset to the start of the image data.

The image header is 40 bytes long, and contains information needed to display the image. This includes the number of samples and lines, the number of bits per pixel, whether the image is compressed, and in the case of palette color, how many colors there are and how they should be handled. The BMP header example shown in Table 3.5 refers to a 24-bit color image, so it includes no information about the color palette.

The image data are stored in byte order, with three bytes (24 bits) per pixel

Section 3.10: AVI: Interleaved AudioA/ideo from Webcams in the example. 24-bit color information is stored in BGR order, and the y-axis follows the Cartesian convention, with the first line of the image at the bottom and the last line at the top of the image.

Was this article helpful?

0 0
Telescopes Mastery

Telescopes Mastery

Through this ebook, you are going to learn what you will need to know all about the telescopes that can provide a fun and rewarding hobby for you and your family!

Get My Free Ebook


Post a comment