Can I generate an image from an animated GIF's single frame?

Yes, you can set the page parameter (pg in URLs) to generate a still image of the specified frame.
For example, here's an animation:
http://res.cloudinary.com/demo/image/upload/cloudinary_animation.gif

And here's how to generate a still image of the first frame:
http://res.cloudinary.com/demo/image/upload/pg_1/cloudinary_animation.gif

Here's a code example in Rails:

cl_image_tag("cloudinary_animation.gif", :page => 1)
Have more questions? Submit a request

Comments

  • Avatar
    Feeligo

    Thanks.

    Is it also possible to generate a static GIF from a video?
    Using the page parameter does not seem to work
    http://res.cloudinary.com/demo/video/upload/pg_1/dog.gif

  • Avatar
    Ido Bar-Noam

    Hi Feeligo,

    In order to create a static GIF you can use the "video sampling" flag and have it sample only one frame instead of several. So for example, the below image wouls sample only on frame from the dog video, and have it delivered as a gif, so you would have a static gif:

    http://res.cloudinary.com/demo/video/upload/vs_1/dog.gif

    Edited by Ido Bar-Noam
  • Avatar
    Feeligo

    Super, thanks a lot.

Powered by Zendesk