The goal is to have animated GIFs playing inside image components with good image quality even after resizing one of the image components.
TImage example
This is the resized TImage
, very bad image quality but flawless animation:
// GIF = TGIFImage
// TImage = TImage
GIF.Animate := True;
TImage.Stretch := True;
TImage.Proportional := True;
TImage.Picture.Assign(GIF);
TImage32 example
This is a resized TImage32
from the graphics32 library, very good image quality but no animation at all, only the first frame ist visible:
// GIF = TGIFImage
// TImage32 = TImage32
GIF.Animate := True;
TImage32.ScaleMode := smResize;
TImage32.BitmapAlign := baCenter;
TImage32.Bitmap.Assign(GIF);
I need to have the TImage32
component play the animation or for the TImage
component to have better resampling.