I have a Form with width 700 and height 500. I put a TImage on it, with Align=alClient and Stretch=True set at design-time.
At run-time, the Image pixels gets blurred. If I set the TImage.Stretch property to False, then at run-time the Image size is shown half of the Form size at the top-left corner. Every Image size gets smaller at run-time than its actual size.
If I disable High DPI then everything works well.
I use Delphi Tokyo. What could be the cause, and how to fix it so I can enable High DPI and all the Image size will remain the same at run-time as at design-time?
If you enable High DPI, you are responsible for providing images in the proper size/resolution. One option you already tried is the
Stretchproperty ofTImage, but that leads to a blurry display.The correct solution is to use a
TImageCollectioncontaining the same image in appropriate sizes, and aTVirtualImagecontrol for the display.Unfortunately, these two components are not available in Delphi 10.2 Tokyo, so you must either upgrade to a newer version of Delphi, or take care of the image handling yourself.