How to make a GIF from photos or a short video
To make a GIF, collect the frames, either still photos in the order you want or a short video clip, then choose a width, a frame rate and a loop setting, and export. Keep the GIF short and narrow. Each frame in a GIF is stored as a separate picture, so the number of frames and their pixel size are what make the file large. Ezgif, GIPHY and CloudConvert compared covers the online options for turning a video into a GIF.
GIF makerNeed a GIF from photos or a clipDo it freeWhat a GIF can and cannot do
The GIF format sets a few hard limits that shape everything else.
- 256 colours per frame. Each frame's colour table holds at most 256 entries, and every pixel points to one of them. Photos with many subtle shades have to be reduced to those 256.
- No sound. The GIF specification defines blocks for images, graphic control, comments, text and application data. It has no audio. A GIF from a video clip plays silently.
- Frame timing in hundredths of a second. Each frame's delay is stored in units of 1/100 s, so a frame can last 0.10 s or 0.50 s but not 0.123 s.
- Looping. The original format plays an animation once. Looping came from a widely used Netscape extension, and nearly every viewer now supports a loop count, where zero means loop forever.
- Compression. The image data is compressed with LZW, which works best on flat areas of identical colour and worst on noise and fine texture.
Why GIFs get big
Each frame is stored separately, as an image, with its own pixels. A GIF with 30 frames holds 30 pictures, not one picture plus changes. LZW compression reduces the size of each frame, but it cannot shrink a frame that is full of noisy detail, such as a photo of grass or a crowd.
The size is set by three things you choose:
- Width and height: the number of pixels in each frame.
- Frame rate: the number of frames per second.
- Length: the number of seconds.
The total number of frames is the frame rate times the length. A 3-second clip at 10 frames a second has 30 frames.
As a worked example, a frame of 480 × 270 pixels has 129,600 pixels. At one byte per pixel, before compression, that is 129,600 bytes for one frame. Thirty frames of that size come to about 3.9 MB before LZW shrinks them. Doubling the width and height to 960 × 540 gives four times the pixels per frame, so the same 30 frames would be about four times as large before compression. Doubling the frame rate or the length doubles the number of frames instead. Each of the three settings multiplies the file. Width is the most expensive because it multiplies the pixels in every frame.
Choose width, frame rate and length
Start from the smallest width that still shows what matters. A GIF that is shown on a phone screen does not need a large frame. Reduce the width before anything else.
Frame rate controls smoothness. A slow motion, such as a pour or a slow turn, looks fine at a lower rate. Fast motion, such as a bouncing ball, needs more frames to look smooth, and each extra frame costs size.
Keep the length short. A GIF is best as a loop of a few seconds. For longer material, a short video is the better format, because video codecs are built to compress motion between frames far more efficiently than GIF's 256-colour, LZW-based frames.
If the result is too large, reduce width first, then the number of frames, then the length. The compress tool handles JPG, PNG and WebP, so shrink any very large photos before you build the GIF from them.
If your frames are already a video clip, the video to GIF tool starts from the clip and trims it to the length you need, which saves exporting frames by hand.
Add text before you export
If the GIF needs a caption, add it to each still before you put the frames together. The add text tool places text on a picture with a colour, an outline or a box behind it. A box keeps the text readable when the background changes from frame to frame. Give the text the same position on every frame so it does not jump.
Dithering and banding
When a smooth gradient, such as a sky, is reduced to 256 colours, the bands between shades can show as stripes. Dithering avoids this by scattering pixels of two neighbouring colours so the eye reads an in-between shade.
The best-known method is Floyd–Steinberg dithering, published in 1976 by Robert Floyd and Louis Steinberg. It spreads the error from each pixel to its unprocessed neighbours using the weights 7/16, 3/16, 5/16 and 1/16. It is the usual choice when a full-colour image is converted to a limited palette, such as a 24-bit PNG to a GIF.
Dithering has a cost. The scattered pixels add detail that LZW cannot compress well, so a dithered GIF is usually larger. Use dithering for photos and gradients. For flat graphics, logos and screenshots, leave it off, since it only adds noise.
Make a loop that runs smoothly
A loop plays best when the last frame leads naturally into the first. Trim the clip so it starts and ends at a similar pose or position. For a video, pick the start and end points so the motion goes round rather than jumping back. A loop that stops and restarts with a jolt usually means the start and end frames are too different.
Quick answers
Can a GIF have sound? No. Add the sound elsewhere, or use a short video instead.
Why does my GIF look striped? Colour banding, from a smooth gradient that has been reduced to 256 colours. Dithering can help, though it adds file size.
Why is my GIF choppy? The frame rate is low, or the frames change by a large step each time. Raise the frame rate if the file can take it, or shorten the clip and check each frame for a big jump.
Does the tool run in my browser? Yes. The photos and video stay on your device while the GIF is made.
Comments
No comments yet. Be the first.


