Lazarus

Programming => Graphics and Multimedia => Graphics => Topic started by: pascal111 on May 06, 2021, 03:12:56 am

Title: Black background with using "TGifAnim" object [SOLVED]
Post by: pascal111 on May 06, 2021, 03:12:56 am
I installed "TGifAnim" package, and used this component and loaded a gif image into it, but when I ran the project the image was moving but on a black background while it's transparent in original image, how can I solve that? 
Title: Re: Black background with using "TGifAnim" object
Post by: wp on May 06, 2021, 01:12:12 pm
Just checked the TGifAnim myself - yes, the background is black. But the Color property of the component defaults to clDefault, and many components have issues with resolving this special color. Better to reset it to an RGB color (clWhite or clSilver), but clForm is working too (at least for me on Win10)

The other Gif component in OPM, GifViewer, works correctly out of the box (you must set AutoPlay to true to start the animation immedicatly after loading the file).
Title: Re: Black background with using "TGifAnim" object
Post by: pascal111 on May 06, 2021, 01:39:52 pm
I changed color to clForm and the background is shown transparent.
TinyPortal © 2005-2018