today I am updating the code. In order to be compatible with HDPI, I replaced TImage with TVirtualImage, and then used TVirtualImage to load GIF, but the GIF image has no animation effect. How to solve this problem
Asked
Active
Viewed 115 times
0
-
Are you hoping to scale the gif image? Because that's not likely to work very well given the image format – David Heffernan Oct 16 '21 at 13:54
-
@DavidHeffernan Yes, in the HDPI environment, I want to automatically scale GIF pictures. Because TVistrulImage supports automatic scaling. But the code I wrote doesn’t work. The animation of GIF pictures is missing. – I Love 404 Oct 16 '21 at 14:06
-
@DavidHeffernan (TImage(VirtualImage1).Picture.Graphic as TGIFImage).Animate := True; This line of code has no effect – I Love 404 Oct 16 '21 at 14:08
-
Well your code is wrong. The hard cast to TImage is wrong. A TVirtualimage is not a TImage. I expect that virtual image has no support for gif animation. But as I said, gif is not a format that is well suited to high dpi scaling. – David Heffernan Oct 16 '21 at 14:31