-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
If, after a larger resample, you assign the new resized image to an existing Bitmap, only part of the content is copied
(exactly the old unscaled bitmap size).
Open the test and load wia_take.bmp attached image using the ... button next to 'Picture to Open'.
Click 'Resize 200%'.
The test creates two new bitmap files, 'resized.bmp' and 'resized_assigned.bmp'.
If you open resized_assigned.bmp, you'll see the problem.
After a debugging session, I realized the problem lies in TCustomUniversalBitmap.CopyPropertiesTo (unibitmap.inc Line 2644),
which is the ClipRect copy.
Basically, Assign only copies the contents of ClipRect when it does PutImage.
In my opinion, CopyPropertiesTo should be done after PutImage.