Recent

Author Topic: Black background with using "TGifAnim" object [SOLVED]  (Read 778 times)

pascal111

  • Sr. Member
  • ****
  • Posts: 284
  • Un trabajo en equipo para programas serias.
Black background with using "TGifAnim" object [SOLVED]
« 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? 
« Last Edit: May 06, 2021, 01:40:19 pm by pascal111 »

wp

  • Hero Member
  • *****
  • Posts: 8550
Re: Black background with using "TGifAnim" object
« Reply #1 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).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

pascal111

  • Sr. Member
  • ****
  • Posts: 284
  • Un trabajo en equipo para programas serias.
Re: Black background with using "TGifAnim" object
« Reply #2 on: May 06, 2021, 01:39:52 pm »
I changed color to clForm and the background is shown transparent.

 

TinyPortal © 2005-2018