I tried to resizing a TBitmap in my program, but it always shows me a small piece from it. The Tbitmap original size is 640480 and I would like enlarge it to Form1.width2 and Form1.height*2.
I tried this piece of code:
mybitmap.Canvas.StretchDraw(Rect(0,0,Form1.width2,Form1.height2),mybitmap);
mybitmap.SetSize(Form1.width2,Form1.height2);
This draws a bigger piece from the bitmap in 640*480 size.
I guess, the second parameter of StretchDraw function is not good, because of original size of the mybitmap. But then what should I add there?