A problem importing a .gif file in GD

So I found a way to import a .gif file from PISKEL but what happens is that PISKEL turns the .gif animation into separate pictures, is there a way to keep it just 1 picture as .gif as it is without any separation ?
it’s my first time working with .gif on GD5 so I might be missing something …

You can try keeping the separated images as the frames of a sprite animation, it will function and look the same as a .gif

Yeah but if every .gif file contains about 30 pictures or more (some contain 100), it will be really hard to manage resources, that’s why I need to import it as just a single .gif and keep it contained not separated, is it possible ?

I haven’t tried, but I don’t think you can import a .gif file.

You can convert it to a .mp4 file and use the Video type object, but I’m not sure if it will work, since a video object is an experimental feature.

No that would be very heavy it won’t work, I heard that it’s possible import a .gif file, I’ll keep looking into it…

1 Like

Sure. Do share it if you find a way :wink:

1 Like

bouh said that it was possible bit didn’t say how. Maybe that is the way it imports animated gifs

1 Like

I asked Kink but he said that it’s not possible to add it as one picture (as a .gif), it must be separated so yeah I think I’ll suffer quite a lot, this needs to be a feature really.


What do you mean? GIFs are usually heavier than compressed videos.
Mp4 videos are most of the time far lighter and easier to play, which is why some social media convert GIFs to Mp4 automatically.
GiFs are much bigger due to lossless compression and often don’t even look as good as a Mp4 video does, not to mention its restriction to a palette of 256 colors. I think their only perk is the lossless compression, which would make them ridiculously bigger than a MP4 video.

Considering you mentioned there are 30-100 frames, I’m assuming it’s not a Sprite animation or anything - so why not export it as a compressed Mp4 video, which would be MUCH lighter, and use the Video object?


Hey thanks for helping, I did use videos yesterday but like I said It results in lag (at most times when starting to loop), the more I add the laggy the game will become, I know it’s lighter but I think it’s just in testing mode at the moment that’s why it’s unstable to use right now.
Also I heard from that it cause crashing from the wiki I think so I won’t risk it because I will be using lot’s and lot’s of animations (hi-quality ones). (Which means I need it in perfect conditions as much as I can).

Another problem I found is there is no flexibility with the video, I mean in events and when to stop and how do you want to stop, which frame you need to stop at and so on, so my best solution is to get back to the old way which is I think the best (I learned my lesson), separated pictures because it gives me many ways to control the animation the way I like it and much easier to control too.

Also I found a way to fix the problem with too many pictures, I found that when extracting the .gif file to .png there are many pictures with the same animation which result in a huge amount of pictures so I just delete the same and for example I have gone from 92 pictures to only 15 pictures from a single animation, so yeah I think It’s fixed now, from 15 to 30 for each animation is not a bad at all considering I was at around 100 picture each.

So yeah separated pictures is the best way if I need to have control on the animation (Lesson learned)
“I’m sorry separated pictures for not trusting you” :grinning:


Just to say that I keep this in my mind when I have more time. I’m going to look to make an event frame by frame, it’s not just a little thing to add for it to work unfortunately … :wink:
I’ve never think to use a video for make a animations in game. It’s pretty risky imo


Oh yeah I totally understand, adding new features and new stuff is not an easy task for sure, I’m pretty sure you’ll figure it out and it will become more stable with new updates in the future, and yup it’s risky, very risky actually.

aren’t you the guy who made Miko’s Adventure?

1 Like

Hey, Yeah that’s me :slight_smile: