Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411977 Posts in 69438 Topics- by 58486 Members - Latest Member: Fuimus

June 15, 2024, 02:06:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)saving a gif, as in 'is there a dll that could do that, when given files' ?
Pages: [1]
Print
Author Topic: saving a gif, as in 'is there a dll that could do that, when given files' ?  (Read 1501 times)
nikki
Level 10
*****


View Profile
« on: June 15, 2010, 04:40:44 PM »

or avi,

i want to add animation capabalities to some of my works, but saving them in an approproate format would be cool too! , the language i work in saves PNG/ and more but no 'animations'

i've managed a solution where the program spits out a tilesheet and i have this little freeware app that does some stuff to it , then i convert it , then i can save as gif ...

having a simple solution that would lead to an instant GIF would be much better.

i don't know anything about dll's or libraries or whatever, but i feel this is one of these learning moments...

Logged
Skofo
Level 10
*****



View Profile
« Reply #1 on: June 15, 2010, 05:48:24 PM »

There are ImageMagick bindings for many different programming languages. I'm not sure what exactly you're looking for, but ImageMagick can do tons of image-related things.
Logged

If you wish to make a video game from scratch, you must first invent the universe.
Dacke
Level 10
*****



View Profile
« Reply #2 on: June 16, 2010, 02:52:04 PM »

Animated pictures can not be replaced by Flash or movie-clips.

If you want more colours and/or a separate alpha-channel, I would suggest using APNG.

I did some speed googling. If you are using C, you can use the libpng library, which has an APNG patch.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
nikki
Level 10
*****


View Profile
« Reply #3 on: June 17, 2010, 05:37:49 AM »

Quote
. If you still wanna use that format, you can have your program save all frames to a series of images, and then import those into Animation Shop (comes with Paint Shop Pro which I think is free, or shareware) with 2-3 clicks and save it. That would be a very simple way, and how I would do it.

that is my working method atm ; 'spits out a tilesheet and i have this little freeware app that does some stuff to it , then i convert it , then i can save as gif ...'

i like animation shop, and it is a great way, but not anymore, atleast not if a user/player needs to be able to generate an animation "on the fly"

imagemagick came up a few times in my google-sessions too, i'll give a test asap,
the 256-palette issue could become a problem , my program has a 256-palette to begin with but does some realtime shading, lightning so it uses well over the 256 limit...

Imagemagick seems to support the next multi-images formats:
gif, mpeg, avi, and mng. there might be more but i don't recognize them.

i'm feeling MNG might be good, but i don't know.

Logged
LemonScented
Level 7
**



View Profile
« Reply #4 on: June 17, 2010, 10:56:02 AM »

Googling for "animated GIF library" comes up with some promising-looking leads, including stuff like this:

http://www.libgd.org/Main_Page
http://www.graphicsmagick.org/
http://www.codeproject.com/KB/graphics/cximage.aspx

As a side-note, I once implemented an animated GIF exporter from scratch, armed with nothing but a description of the file format. If you do this, you are insane. It's a bloody fiddly file format and the exporter took me an obscene amount of time to get right. It's basically only worth doing if you have a lot of time on your hands and you're particularly interested in how the file format works (I was). Unless you need to create a very large number of GIFs, or unless it's crucial that your finished program be able to export GIFs then I'd stick with doing it manually, but failing that, use someone else's code.
Logged

lansing
Level 2
**


View Profile
« Reply #5 on: June 17, 2010, 04:19:29 PM »

ffmpeg can do it, as a command it's easiest to assemble an animated gif from a list of images with a specified framerate, or it can also convert an .avi or any other video into a gif, again with your preferred framerate.
Logged
nikki
Level 10
*****


View Profile
« Reply #6 on: June 17, 2010, 04:49:35 PM »

ive managed to get imagemagick to create a gif from a commandline input (or bat file)
i spend hours trying to get it to work, in various forms of sillyness, until i downloaded another version and it worked perfectly!

Now i'm looking at the filesize of the 'import' and it's roughly 5 mb for mere png to gif saving thats rough, so i fear i need to build the exe in c myself (wich i've never done)
however, thats not my really my top priority here the filesize
« Last Edit: June 17, 2010, 04:52:46 PM by nikki » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic