Animations in PHP or Linux

Status
Not open for further replies.

Vormund

Daemon Poster
Messages
1,178
Location
USA
Does anyone know of an easy way to compile a bunch of JPG's into a GIF animation - either via PHP or any linux utilities?
 
First convert the JPGs into sequentially named GIFs, and then you can use
Code:
convert -adjoin -delay 5 *.gif animation-name.gif
(the convert command is part of imagemagick)

Making a BASH script to do this would be pretty easy if you're going to want to do this multiple times.
 
First convert the JPGs into sequentially named GIFs, and then you can use
Code:
convert -adjoin -delay 5 *.gif animation-name.gif
(the convert command is part of imagemagick)

Making a BASH script to do this would be pretty easy if you're going to want to do this multiple times.
ImageMagick ... perfect. I tried that once before under Windows, but could never get it working quite right - the animation would either be garbled images or the delay was always...minutes apart. Gotta give it a try on nix, the OS it was meant for. :) Danke.
 
I'm having trouble getting nix up on my laptop (the wireless annoyance), so I'm just running Debian in the VM right now. I don't think GIMP has the ability to do it from the command line, but ImageMagick should as after he mentioned that, I remembered trying to use it on Windows long ago...:)
 
Huh.....interesting. I've never thought of running it from a command-line :freak:. I guess the thought of working with graphics always involved a graphical user-interface. That's very interesting. It's funny when you assume that theres no other way of doing it when such a (not-so-)simple solution lies right there! How does it work for you? Do you have to pass all of the arguments (like effects, animations, whatever) on the command-line with the image location?
 
That's the plan! :)

I don't know the exact arguments, but it's something like...

compileGIF <delay> <loop quantity> <img1, img2, img3...>

I still have to get it running myself, but the reason behind it is semi funny - the university has a cam on a taller building here, snapping a pic every minute. I have my server pulling the images, but want to have a time-lapsed version - something like the last hour or two, see what the weather is really doing...:laughing:
 
Oh!!! So you are trying to take 120 images and make a 10 second .gif?? All by command line!!! That's hardcore man! If you want some help, zip up the files and i'll help with a little point and click if I can.
 
Lots of times doing things with the command line is much more efficient than using a GUI, and this is one of those cases.
 
Lots of times doing things with the command line is much more efficient than using a GUI, and this is one of those cases.
Funny comment there...as I actually wrote a small AutoIt script to launch Flash and make a very simple/fast animation...more for concept, but yeah. :laughing:

Re your comments, Slim420, I honestly have since dumped my cache of images...need to rerun the script, which hopefully I'll get started on this weekend (have to put the script on my new server, and find a place to call it every 60 seconds, hah! I need a wget cronjob placed on a nix server...after I find a nix server!)... but once that's done, they'll all be in a public directory on my server if you wanted to play, too. :rolleyes:

This is the specific cam. image I was/am talking about, for those curious:
Arizona Webcam

As the page mentions, it's updated (and automatically refreshed) every minute. Nice for a time-lapsed animation...!

The experience from playing with Linux is superb, although, I wish I could get the wireless working on the laptop!
 
Status
Not open for further replies.
Back
Top Bottom