델파이 Windows.Pas에 선언된 Bitmap File 구조체
tagBITMAPFILEHEADER = packed record
bfType: Word; { $4d42 (i.e. 'BM') }
bfSize: DWORD; { Size of file }
bfReserved1: Word; { Reserved }
bfReserved2: Word; { Reserved }
bfOffBits: DWORD; { Byte location in the file which is first byte of image }
end;
tagBITMAPINFOHEADER = packed record
biSize: DWORD; { Size of tagBITMAPINFOHEADER }
biWidth: Longint; { width of bitmap }
biHeight: Longint; { height of bitmap }
biPlanes: Word; { 1 }
biBitCount: Word; { 1 (mono) or 4 (16 colors ) or 8 (256 colors) or 24 (16 Mil colors) }
biCompression: DWORD; { RLE COMPRESSION }
biSizeImage: DWORD; { Width x height }
biXPelsPerMeter: Longint;
biYPelsPerMeter: Longint;
biClrUsed: DWORD; { Number of palettes used (if less than standard) }
biClrImportant: DWORD; { Number of important color}
end;
var BitmapFileHeader: TBitmapFileHeader; BitmapInfoHeader: TBitmapInfoHeader; FileStream : TFileStream; Begin ... // The file stream to the file. You should change the file path :-) FileStream := TFileStream.Create('C:WindowsBubbles.bmp', fmOpenRead); try FileStream.Read(BitmapFileHeader, SizeOf(BitmapFileHeader)); FileStream.Read(BitmapInfoHeader, SizeOf(BitmapInfoHeader)); finally FileStream.Free; end; ... end;