Declaration
procedure CopyFromDIB(Source: THandle); overload;
procedure CopyFromDIB(BitmapInfo: pointer; Pixels: pointer = nil); overload;
Description
Copies from the specified DIB handle.
The second overload copies from a DIB composed by a BitmapInfo structure and pixels buffer pointer.
When Pixels is null, pixels are supposed to stay just after BitmapInfo structure.
Note: if
ParamsEnabled = True, then the DPI is returned in
Params.
DpiX and
Params.
DpiY
IEBmp :=TIEBitmap.Create();
IEBmp.ParamsEnabled := true; // So we can get the DPI
IEBmp.CopyFromDIB( HDib ); // Copy from HDIB passed by scanner
lblDPI.caption := IntToStr( IEBmp.Params.DpiX );
ImageEnView1.IEBitmap.assign( IEBmp );
IEBmp.Free;