From 77121d9b42891c858d31f843f6432e80c3d4f7ec Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Tue, 5 Nov 2024 17:32:43 +0100 Subject: [PATCH] LCL/GraphUtil: Exit ScaleImg immediately when no size change of the image is needed. --- lcl/graphutil.pp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lcl/graphutil.pp b/lcl/graphutil.pp index 1129ab0f09..ded4961a42 100644 --- a/lcl/graphutil.pp +++ b/lcl/graphutil.pp @@ -371,6 +371,9 @@ var srcImg: TLazIntfImage = nil; destCanvas: TLazCanvas = nil; begin + if (AImage.Width = AWidth) and (AImage.Height = AHeight) then + exit; + try // Create the source LazIntfImage srcImg := AImage.CreateIntfImage;