Oops - One more option if using D4 - Make it into a resizable dockable window.
Myles
-----Original Message-----
From: Alistair George [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, July 01, 1999 12:39 PM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Image size
Ahh, I see where ur coming from; it aint that easy - I cant change the Image size - it
is fixed due to interface limitations.
CopyDibIntoImage(TestDib, Image2);
image2.Picture.Bitmap.Height:=clientheight;
image2.Picture.Bitmap.width:=clientwidth;
With the above image2 set to stretch it fits the bitmap to scale, but crops as I
previously described according to image height and width charateristics. I think what
I gonna have to do is frig around with Image bitmap to suit the stretch-ability of the
component size and use that as the visual, but use the 'TestDib' as the actual picture
store as that hasnt been frigged with.
Chrs,
Al+
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
> Behalf Of Myles Penlington
> Sent: Thursday, 1 July 1999 12:15
> To: '[EMAIL PROTECTED]'
> Subject: RE: [DUG]: Image size
>
> 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