How to display a GIF file?

Hey guys i’m trying to do a simple game project and i want to make a fake loading screen at the start of the game, the problem is that i don’t know how to do it. I have my GIF on Resources, but whatever i do i can’t make that image that pops up to move, it just stays stacionary. Could you please give me a code sample on how to display GIF?

I’m using FEZ Spider if that’s somehow important.

Correction, GIF is supported but not animated GIF.

Perhaps this Codeshare entry will help. https://www.ghielectronics.com/community/codeshare/entry/1079

1 Like

Oh wow, i never knew there is such thing as not animated GIF :smiley: . I feel so dumb now.

I’d love to try that code but i have a problem. Such methods GetBytes and BinaryResources does not exist for some reason. Maybe i’m adding a GIF to Resources folder wrong way? I have GetBitmap and GetFont methods, but no GetBytes :confused:

Rename your file’s extension from GIF to bin.

What version of Visual Studio are you using?

It sounds like you are using an older version of Visual Studio (i.e. - pre 2013) or re-using an old project solution. If you remove and re-add the GIF resource all will be fine.

I’m not sure, I ran into a problem with GIF’S where I needed to display transparencies. This was the workaround I found that works for me…
Also, I found a reference months (years?) ago somewhere to a project that was using animated GIF’s , but will only do some searching for it if there is an expressed interest in using that feature (and no guarantees, its just ringing bells)…

[quote]Well, at the time, I was trying every thing I could think of to get the transparency to work. While, I don’t know exactly the root cause, this is the procedure I found works for me.

Upload your image to this site, click optimize, and select one of the options. Among other things, it will reset the transparency color. While writing this email, I actually tested it on an image I knew I had issues with previously. To be honest, I am not 100% sure what exactly it fixes, as digging into the GIF format was becoming way more work than I cared for, and as soon as I got a repeatable work around, I stopped digging.
(Not to mention, the optimization is pretty good, and the smaller the image, well you are working with a micro…)[/quote]