I know DevEx does not support animated GIFs (http://www.devexpress.com/Support/Center/Question/Details/Q522520) so I placed a Delphi TImage on my form, loaded an animated gif into the Picture property, then tried to start it with
(ImgProgress.Picture.Graphic as TGifImage).Animate := true;
which is the recommended way (http://stackoverflow.com/questions/14158186/animated-gif-in-delphi-xe-3-forms referencing http://stackoverflow.com/questions/9573572/how-to-use-animated-gif-in-a-delphi-form)
However this does not run, it gives an 'Invalid class typecast' at runtime.
When looking at the TImage in the Object Inspector, I notice that its Picture property indicates a type TdxSmartImage (and at runtime ImgProgress.Picture.Graphic.ClassName = 'TdxSmartImage').
That is one of your types (TdxSmartImage = class(TdxGPImage) in dxGDIPlusClasses.pas)!
Are the DevEx components interfering with the TImage.Picture?
[No sample code, this is easy to reproduce]
There is a far worse and lot more common side effect to the new "TdxSmartImage for everything" approach:
Since v2013 vol 2.2 we have the following issue:
At design time, it's not possible anymore to use "Color-Transparent" bitmaps (e.g. the common "Fuchsia background should be treated as transparent" approach).
Affected are:
- Editors for TBitmap (for example: TSpeedButton.Glyph, TToolButton.Glyph, …)
- Editor for TImageList
- Editor for TPicture (for example: TImage.Picture)
(See attached screenshot for the results…)
Only thing necessary for these effects: A registered DevExpress design time BPL (anyone will work…)
TPicture additionally has the side effect to include dxGDIPlusClasses in the header and will then use TdxSmartImage even at runtime. It's not possible anymore to use a simple TBitmap anymore (neither TPngImage nor TJPEGImage) except by recompiling the DevExpress design time packages!
An additional side effect is that GraphicFilter(TGraphic) to get a filter string for all known image format returns strings like "PNG from DevExpress"
The user now has to decide between using "Portable Network Graphics (*.png)" and "PNG from DevExpress (*.png)"
I've no idea what a user would think about "PNG from DevExpress (*.png)". Probably something like
- "This is probably a special image format defined by DevExpress"
- "What is the differences to the other PNG?"
- "What is DevExpress?"
Long story short: I doubt that such a dialog filter would pass user acceptance…
Hello Tom,
I suggest that you try the hot fix from the Adding a BMP file to a TImageList object results in the "File format not supported by imagelist editor" error ticket. It should fix the transparency issue.