var
FormImage: TBitmap;
Info: PBitmapInfo;
InfoSize: DWORD;
Image: Pointer;
ImageSize: DWORD;
Bits: HBITMAP;
DIBWidth, DIBHeight: Longint;
px,py:integer;
Size: TPoint;
begin
FormImage := Tbitmap.Create;
formimage.loadfromfile('xxxxxxxx');
try
Bits := FormImage.Handle;
GetDIBSizes(Bits, InfoSize, ImageSize);
Info := AllocMem(InfoSize);
Image := AllocMem(ImageSize);
GetDIB(Bits, 0, Info^, Image^);
with Info^.bmiHeader do
begin
DIBWidth := biWidth;
DIBHeight := biHeight;
px:=biXPelsPerMeter; //每米的象素
py:=biXPelsPerMeter; //每米的象素
end;
finally;
formImage.free;