Scales the specified bitmap image to the required dimensions.
Source position: graphutil.pp line 76
procedure ScaleImg( |
AImage: TCustomBitmap; |
AWidth: Integer; |
AHeight: Integer |
); |
AImage |
|
Bitmap image resized in the routine. |
AWidth |
|
New width requested for the image. |
AHeight |
|
New height requested for the image. |
ScaleImg is a procedure used to scale the bitmap in AImage to the dimensions in AWidth and AHeight.
No actions are performed in the routine if AImage already has the dimensions specified in AWidth and AHeight.
ScaleImg uses the CreateIntfImage method in the bitmap image to create TLazIntfImage instances for both the original source image and a destination image. The destination image is configured with the new width and height. A TLazCanvas instance is created for the scaled image and its StretchDraw method is used to resize and draw the original image on the Canvas.
The Canvas is configured to use interpolation when both the width and height for the scaled image are larger than the values in the original image. Pixels generated / inserted into the destination image are an estimate of the surrounding pixel values from the original image.
AImage is updated with the resized image content prior to exiting from the routine.
|
CreateIntfImage - creates an image on the Interface. |
|
|
Loads the image from a TLazIntfImage instance. |
|
|
Implements a canvas which masks differences between FCL and LCL canvas classes. |
|
|
Represents a graphical image. |
| Version 4.4 | Generated 2025-11-08 | Home |