0
Hello.
I’m looking to build a BMP in C-language. I only receive image data, data size, width, height, bpp.
I was able to mount the following header structure of BMP:
struct BMPHeader
{
uint16 signature; // 0-1 magic chars 'BM'
uint32 fileSize; // 2-5 uint32 filesize (not reliable)
uint32 filler1; // 6-9 uint32 0
uint32 bitmapOffset; // 10-13 uint32 bitmapOffset
uint32 infoSize; // 14-17 uint32 info size
int32 width; // 18-21 int32 width
int32 height; // 22-25 int32 height
uint16 nPlanes; // 26-27 uint16 nplanes
uint16 bpp; // 28-29 uint16 bits per pixel
uint32 compression; // 30-33 uint32 compression flag
uint32 imageSize; // 34-37 uint32 image size in bytes
int32 biXPelsPerMeter; // 38-41 int32 biXPelsPerMeter
int32 biYPelsPerMeter; // 32-45 int32 biYPelsPerMeter
uint32 colorsUsed; // 46-49 uint32 colors used
uint32 importantColorCount; // 50-53 uint32 important color count
};
As mentioned above, a lot of the header information I get from a java application, except this:
int32 biXPelsPerMeter; // 38-41 int32 biXPelsPerMeter
int32 biYPelsPerMeter; // 32-45 int32 biYPelsPerMeter
Can anyone tell if these two variables come from the calculation of the variables I received? I did not understand well what they represent...
Thank you in advance.