Made gif animation loading on the form. But near the gifs a white background, how to make it color forms. I tried to remove the background from the gif, but then it turns out terribly not beautiful pixels.
- Give the code, how you added the GIF, write what components you used. - Kromster
3 answers
Comments can not leave.
The background in gif cannot be made under the color of the form, because in Windows the color of the form can change depending on the user's settings (the chosen theme).
It is necessary to look towards apng (Animated Portable Network Graphics), it supports the normal alpha channel for transparency.
- oneThe question is animation. How do you suggest doing animation in PNG? - Kromster
- By timer, change the pre-loaded picture (or tear out a large part of the picture and copy to the right place on the form). And there is apng. - Vlad Chapl
- You do not need to reinvent the wheel with timers and "pulling out", it is better to use apng. - kot-da-vinci
Need a gif with transparency. Examples: https://www.google.com/search?q=loading+gif&tbm=isch&tbs=ic:trans
Standard TImage in Delphi 2010 supports transparency. As for earlier versions do not know.
If the form behind the gif-image is monochromatic, then it is best for the gifs to simply fill the background with the color of the form. It is better in such cases to have the source of the animation, for example in a psd or vector. Otherwise, it may not work out so that it looks good, especially if the resolution of the animation picture is small.