I load an image from disk and want to copy (part of it) to the second TImage file:
Image1.Picture.LoadFromFile(S); with Image1.Picture.Bitmap do Image2.Canvas.CopyRect(Image2.Canvas.ClipRect, Canvas, Canvas.ClipRect);
Image2 just shows a white rectangle, while Image1 does not show a file from disk. If I delete the second statement, Image1 will show the image. (The strangest thing: if I only comment on the CopyRect instruction and leave the string ācā (an empty statement), Image1 does not show a single one!)
How to use CopyRect to copy parts of an image?
change
When I separate two operators into two separate actions (buttons), the following happens:
- Uploading Images and Impressions to Image1
- Image1 disappears (!), And Image2 shows a white rectangle.
By the way, I'm using Delphi 2009.
source share