Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Animated gif and transparent background
Message
From
26/03/2010 00:37:49
 
 
To
25/03/2010 01:30:21
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01456409
Message ID:
01457362
Views:
50
>>>>>>AH, I am sorry, now only I realize UT's [View] button (View all messages of this thread) won't show attachedment of a message at all. I must click and bring up your previous message alone in order to see your attached GIF...
>>>>>>
>>>>>>Btw, I try your GIF with the codes that I have presented earlier, it works exactly like mine... I mean it also screw up if the background is transparent. (Note that for all my attached snapshot, the sandpaper pattern is my VFP application desktop background (it is not plain white)
>>>>>>
>>>>>>Please see attached snapshots of this message.
>>>>>
>>>>>It works on plain background of any color not an image background.
>>>>
>>>>If you see the second snapshot of my previous message, your GIF 's transparent background work correctly (I mean it is as transparent as it suppose to be) on the image background (in this case the sandpaper).
>>>>
>>>>The problem is when the background is transparent, the flipping of the "Come In" goes wrongly... In fact when you suggest to set backstype=1, you are suggesting me to disable the background transparency (though it does make the animation - flipping of the "Come IN" displayed correctly),
>>>Hi,
>>>
>>>Maybe it is a solution for us to see what your problem is if you uploaded the transpararent.GIF and nor a .JPG ?
>>>
>>>Regards,
>>>
>>>Koen
>>
>>I have uploaded 2 JPG showing my problem right in the very first post of this thread.
>>Btw, you will need to bring up that message alone in order to see the attachments. You will not see them if you list all messages, say by clicking the [View] button.
>
>Lim
>
>I see the exact same problem as you. The situation is that on a normal form (with no image in the picture property) the gif shows up animated and with a transparent background with the Backstyle = 1 (Default) . So far so good.
>
>This is how it should appear.
>
>But as soon as you place anything behind it and the form, by
>1. set the picture property of the form
>2. drop an image control behind the gif.
>
>you see the background of the GIF as the same colour as the form background. And if you make the gif.BackStyle = 0 (Transparent) you see the image drawing over itself as you showed in your images.
>
>The only solution I know (and there is one) is to use the GDI+X classes and manually animate the GIF. I have actually tried this and the effect is perfect. You can set the form.picture to an image and the GIF will still have a transparent background.
>
>If you want I can upload a sample for you to download and try.
>
>If so you need to download the GDI+x classes from the VFPX website as these will be needed.
>
>With them you can actually speed-up/slow down and do other things with animated GIF's nor normally possible.
>
>But be assured, the GDI+X classes do work.
>
>Download thelinked file, extract it and read the readme.txt
>
>http://www.multiupload.com/W173RVUQWG
>
>(if the download has not yet appeared, try again later as multi upload mirrors the file and this may take some time.)


Hi Bernard,

A thousand thanks to you! I will give GDI+x a try.

Btw, I have 2 quick questions before I really dig in and try,
1) Is GDI+x classes try to manipulate the GIF as a file or I will have to extract all images that compose the GIF and manipulate them to create the animation effect?
2) Can GDI+x classes resize and display an animated GIF on-the-fly? (I mean not to create another GIF file in different dimension but to display its animation in diff size with the same ratio)

Currently, I solve the problem by placing a round (opaque) background in the GIF itself, so that animation always take place (in my case the red bands of the GIF image that rotate) within the area of this round solid background. This of course is not a perfect solution.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform