mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Avoid unnecessary conversions in uGraphics.BitmapConvert()
(cherry picked from commit d4b78d952e)
This commit is contained in:
parent
8dcb8c24b8
commit
f4b6255763
1 changed files with 4 additions and 5 deletions
|
|
@ -58,11 +58,10 @@ begin
|
|||
try
|
||||
Target:= TLazIntfImage.Create(ASource.Width, ASource.Height, [riqfRGB, riqfAlpha]);
|
||||
try
|
||||
{$if lcl_fullversion < 2020000}
|
||||
Target.CreateData;
|
||||
{$endif}
|
||||
Target.CopyPixels(Source);
|
||||
BitmapAssign(ATarget, Target);
|
||||
if NOT Target.DataDescription.IsEqual(Source.DataDescription) then begin
|
||||
Target.CopyPixels(Source);
|
||||
BitmapAssign(ATarget, Target);
|
||||
end;
|
||||
finally
|
||||
Target.Free;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue