Ask your own question, for FREE!
Mathematics 22 Online
OpenStudy (anonymous):

how many bytes of data does each pixel create in and image

OpenStudy (anonymous):

There are many types of bitmaps. There are also different pixel formats for them. Some use palettes and some don't. Make sure that you load it as a binary file. I made that mistake In windows bitmaps, any palette entries use 4 bytes. There is a short(16-bit integer) starting at the 29th byte in the file that determines the pixel format(bits per pixel). Look at a few *.bmp files in a text editor to see how information is stored in them. The width is a 4 byte integer starting at the 19th byte of the file. The height is a 4 byte integer starting at the 23rd byte. Here are some explanations of a few pixel formats. 1: monochrome, 8 pixels stored in 1 byte, uses 2 palette entries. 4: 16 colour, 2 pixels stored in 1 byte, uses 16 palette entries. 8: 256 colour, 1 pixel in 1 byte, uses a 256 colour palette 16: 2 bytes per pixel, uses r,g,b values(5 bits each) 24: 3 bytes per pixel, uses r,g,b values(8 bits each) 32: 4 bytes per pixel, uses an alpha byte(basically unused) and r,g,b values(8 bits each) If the bits per pixel is less than or equal to 8(using a palette), the palette entries start at the 55th byte of the bitmap. The pixel data starts right after the palette entries. If the palette isn't used, the pixel data starts at the 55th byte.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!