How can I create an animated .gif from a movie?
How can I create an animated .gif file from a movie I have? I guess it is pretty simple in objective-C and cocoa, by using the QTKit, to ex开发者_如何转开发tract images from a movie, now how can I glue them together as an animated gif?
I don't think there's anything built into OS X for creating animated GIFs. Your best bet would be to look at the gifsicle project. You could either call it via command-line, or borrow the code if your license allows it. (it's GPL)
http://www.lcdf.org/gifsicle/
There is a pretty good lib (even if 'old') for this task (and other kinds of image processing): libgd. It appears it is built into Mac OS X or easly installable through MacPorts. Here some doc about animated GIF creation from single images.
精彩评论