After you copy to the bitmap, then change the Bitmap display size and set stretch to
true.
Intially set the bitmap to the same size as the DIB.
TestDib := TWAIN_GetDib(0);
CopyDibIntoImage(TestDib, Image2);
IMAGE2.Stretch := True;
image2.Height:=Clientheight; // Don't change the bitmap size, change the
picture/control size
image2.width:=Clientwidth;
Just tried using a TImage at design time.
eg Load bitmap, Stretch is false so cannot see all of bitmap,
Set Strech to true - can now see all of it.
Change size to get aspect ratio correct.
Myles
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
> Behalf Of Myles Penlington
> Sent: Thursday, 1 July 1999 11:19
> To: '[EMAIL PROTECTED]'
> Subject: RE: [DUG]: Image size
>
> Can't you just calculate the required (scaled) size of the
> Destination bitmap, and then set Stretch = True? May need to put
> it on a Scrollable panel?
> Myles
Hi Myles. If I did that, it would crop the bitmap.
As per the following:
TestDib := TWAIN_GetDib(0);
image2.Picture.Bitmap.Height:=Clientheight;
image2.Picture.Bitmap.width:=Clientwidth;
CopyDibIntoImage(TestDib, Image2);
application/ms-tnef