Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7779775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:43:29+00:00 2026-06-01T18:43:29+00:00

I can do it easily in my OS convert -delay 1/1 -loop 0 *.gif

  • 0

I can do it easily in my OS

convert -delay 1/1 -loop 0 *.gif animated.gif

But I can’t find how to do this in the PHP API. No resizing or anything needed, I’ve just got a set of frames that need animating.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:43:31+00:00Added an answer on June 1, 2026 at 6:43 pm

    While I’m not a PHP expert, I know that this issue isn’t a too difficult one. What you want to do is create an Imagick object that you can append your frames to. With each frame you can change parameters like timing etc.

    Assuming you’re working with images that are uploaded from a basic web form, I’ve written a basic example that loops through images that were uploaded with a name of “image0”, where “0” goes up to however many files are included. You could naturally just add images by using the same methods on fixed file names or whatever.

    $GIF = new Imagick();
    $GIF->setFormat("gif");
    
    for ($i = 0; $i < sizeof($_FILES); ++$i) {
        $frame = new Imagick();
        $frame->readImage($_FILES["image$i"]["tmp_name"]);
        $frame->setImageDelay(10);
        $GIF->addImage($frame);
    }
    
    header("Content-Type: image/gif");
    echo $GIF->getImagesBlob();
    

    This example creates an Imagick object that is what will become our GIF. The files that were uploaded to the server are then looped through and each one is firstly read (remember however that this technique relies on that the images are named as I described above), secondly it gets a delay value, and thirdly, it’s appended to the GIF-to-be. That’s the basic idea, and it will produce what you’re after (I hope).

    But there’s lot to tamper with, and your configuration may look different. I always found the php.net Imagick API reference to kind of suck, but it’s still nice to have and I use it every now and then to reference things from the standard ImageMagick.

    Hope this somewhat matches what you were after.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can easily alert anything in java script. Is it possible to get this
In PHP, you can easily convert an English textual datetime description into a proper
Can anybody give an example of c++ code that can easily convert a decimal
Using scons I can easily set my include paths: env.Append( CPPPATH=['foo'] ) This passes
Can I easily convert InputStream to BufferedReader using Guava? I'm looking for something like:
can you easily convert an xdocument and xelement into string to store in the
In the below example, how can I easily convert eventScores to List<int> so that
issue is this: in (pl)python code, we've calculated an integer = 26663. Can easily
Possible Duplicate: How can I easily convert DataReader to List<T>? I want to put
In Ruby on Rails you can easily convert any text into a format which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.