Firemonkey iOS – Copy part bitmap

  

Im wanting to copy part of a bitmap to another bitmap, to create a preview type window eg

ImagePreview.Bitmap.setSize(Trunc(ImageSource.Width)*2,40);
TopLeft:=Point(0,Trunc(ImageSource.Height/2));
Rect:=TRect.Create(TopLeft,Trunc(ImageSource.Width)*2,40);
ImagePreview.Bitmap.CopyFromBitmap(ImageSource.Bitmap,Rect,0,0);

However, the Preview window never seems to show the correct part of the ImageSource bitmap.

My aim is to have the preview window show the center (vertical) of the ImageSource.

Comments are closed.