Hello,
I want to assign current layer's content to Delphi's ImageControl?
But I am not able to do this.
//Load the bitmap here
MyBitmap := TIEBitmap.Create;
MyBitmap.Assign(ImageEnViewMain.Layers[LayerNum].Bitmap);
if MyBitmap.Width > MyBitmap.Height then
MyBitmap.Resample(80, -1,rfNone,True)
else
MyBitmap.Resample(-1, 80,rfNone,True);
//Assign the bitmat to StringGrid Cell
MyCanvas := TImage(CurrentControl).Canvas; //TCanvas.Create;
MyBitmap.RenderToCanvas(MyCanvas, Rect.Left, Rect.Top,
Rect.Right - Rect.Left, Rect.Bottom - Rect.Top, rfFastLinear, 0);
MyBitmap.Free;
What mistake am I making in this code?
TIA
Yogi Yang