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)
Comments
3 comments
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
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
Super, thanks a lot.
Please sign in to leave a comment.