Creating BMP file

Thread Starter

StephenDJ

Joined May 31, 2008
58
Hi, does anyone know what the Pixels per Meter (bytes 38-45) parameter in a BMP file does? I can read the file one byte at a time into my program using
OPEN "R",1,"filename.BMP",1
FIELD #1,1 AS BYTE$
GET #1,offset
PRINT ASC(BYTE$)

but different values appear in this field for different files and I'm not sure how to render this or know what values to put there.
 
Last edited:

studiot

Joined Nov 9, 2007
4,998
Bytes 38 to 41 (4 bytes) gives the horizontal resolution in pixels per meter.

Bytes 42 to 45 (4 bytes ) gives the vertical resolution in pixels per meter.

Bytes up to offset 53 give information about the image

Bytes 54 on give the color map.

Do you need anything else?
 

Thread Starter

StephenDJ

Joined May 31, 2008
58
Bytes 38 to 41 (4 bytes) gives the horizontal resolution in pixels per meter.

Bytes 42 to 45 (4 bytes ) gives the vertical resolution in pixels per meter.

Bytes up to offset 53 give information about the image

Bytes 54 on give the color map.

Do you need anything else?
Thanks, I've googled everywhere, have the information on the format, and know what bytes goes where in the file but I still can't figure out exactly what to do with the pixels/meter value for either dimension. I think it has something to do with the scaling, -how big or small the image appears regardless of how many pixels it actually has. I looked at bertus's links but they just simply state that is the "resolution in pixels per meter" and give nothing more. (-confused)
 
Last edited:
Top