Graphics

For other topics related to the FreeBASIC project or its community.
Boromir
Posts: 451
Joined: Apr 30, 2015 19:28
Location: Texas,U.S., Earth,Solar System
Contact:

Graphics

Postby Boromir » Apr 30, 2015 19:37

How can I Import Animated Gifs into an array so that I can change its position on the screen?
counting_pine
Site Admin
Posts: 6229
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Graphics

Postby counting_pine » Apr 30, 2015 21:44

Hi Boromir, welcome.
FreeBASIC's built-in image format support doesn't extend beyond BMPs. There are external libraries that can though. I don't know what animated GIF support is like.. Do you have a specific library in mind?
BasicCoder2
Posts: 3594
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Graphics

Postby BasicCoder2 » Apr 30, 2015 22:46

A method I used was to open the .gif file with Windows Live Photo Gallery and then save each frame as a bitmap.
image1.bmp
image2.bmp
and so on ...
bload them into a list of bitmap images
bload "image1.bmp",hero(1)
bload "image2.bmp",hero(2)
and so on ...
Of course bitmaps use a lot of memory which may be an issue if they are part of a game to be downloaded on the internet.
Boromir
Posts: 451
Joined: Apr 30, 2015 19:28
Location: Texas,U.S., Earth,Solar System
Contact:

Re: Graphics

Postby Boromir » May 01, 2015 17:49

The only Library I have ever used is the Fmod sound Library. Could you suggest a good graphics library.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests