Reputation: 29
How can I speed up image loading in TImage
in Delphi 10.2?
I want to move a project from Delphi 7 to Delphi 10.2, but I'm having trouble loading files. In Delphi 10.2, images take much longer to load, and quality is lost.
In Delphi 7, it takes about 3 seconds. In Delphi 10.2, it takes 15 seconds.
From Delphi 7:
From Delphi 10.2:
This is how I load the file:
IMG.Picture.LoadFromFile(ExtractFilePath(ParamStr(0)) + IMG.Hint);
I tried to connect GDIPAPI, GDIPOBJ, GDIPUTIL, but it did not work.
I finally tried to make a program snippet to demonstrate my problem: https://github.com/MrDimain/TestPicsSpeed.git
Upvotes: 2
Views: 302
Reputation: 1
Apparently the only solution is to use WICImage.LoadFromFile but loose some control like loading progress.
Upvotes: 0