|  | |
07-24-2007, 08:16 PM
|
#1 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183
| Animations in PHP or Linux 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?
__________________ |
| |
07-25-2007, 02:20 AM
|
#2 (permalink)
|
Indeed. Join Date: Dec 2004 Posts: 1,554
| Re: Animations in PHP or Linux 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.
__________________ |
| |
07-25-2007, 04:21 PM
|
#3 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183
| Re: Animations in PHP or Linux Quote:
Originally Posted by Greg 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.
__________________ |
| |
08-01-2007, 11:53 AM
|
#4 (permalink)
|
Newb Techie Join Date: Jul 2007 Location: America Posts: 18
| Re: Animations in PHP or Linux When using GIMP you can specify the delay times I believe. |
| |
08-01-2007, 05:20 PM
|
#5 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183
| Re: Animations in PHP or Linux 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...
__________________ |
| |
08-01-2007, 07:48 PM
|
#6 (permalink)
|
Newb Techie Join Date: Jul 2007 Location: America Posts: 18
| Re: Animations in PHP or Linux 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? |
| |
08-01-2007, 08:21 PM
|
#7 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183
| Re: Animations in PHP or Linux 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:
__________________
Last edited by Vormund; 08-01-2007 at 08:42 PM.
|
| |
08-02-2007, 05:28 PM
|
#8 (permalink)
|
Newb Techie Join Date: Jul 2007 Location: America Posts: 18
| Re: Animations in PHP or Linux 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. |
| |
08-03-2007, 01:00 AM
|
#9 (permalink)
|
Indeed. Join Date: Dec 2004 Posts: 1,554
| Re: Animations in PHP or Linux Lots of times doing things with the command line is much more efficient than using a GUI, and this is one of those cases.
__________________ |
| |
08-03-2007, 07:33 PM
|
#10 (permalink)
|
Monster Techie Join Date: May 2004 Location: Tucson, AZ, USA Posts: 1,183
| Re: Animations in PHP or Linux Quote:
Originally Posted by Greg 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!
__________________ |
| |  | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |