Free plan

Extract Frames

Save the frames of an animated GIF as separate pictures
POST
/v1/images/frames

About this tool

Takes an animated GIF or WebP, or a TIFF with several pages, and saves each frame or page as its own picture. You can pick only certain frames, such as 1 and 3 to 5, and choose PNG, JPEG or WebP for the results. It takes one file at a time.
For example, you pull the single frames out of a GIF to use one as a still image.

How to use it

  1. Choose this tool.
  2. Add one animated picture or multi-page TIFF with Upload or drag and drop.
  3. Choose which frames you want, or leave it empty for all.
  4. Choose the file type, then press Generate.
  5. Download the frames.

What you get back

You get each chosen frame as its own picture, which you can download, usually together in one ZIP file.
TEST IT LIVE

Try Extract Frames in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/frames
Tool ID
images.frames
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/images/frames" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'images=@photo.jpg' \
  -F 'format=png' \
  -F 'output_bundle=zip' \
  -F 'response=url'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.frames({
    "images": 'photo.jpg',
    "format": "png",
    "output_bundle": "zip",
    "response": "url"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->frames([
    'images' => 'photo.jpg',
    'format' => 'png',
    'output_bundle' => 'zip',
    'response' => 'url',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Save the frames of an animated GIF as separate pictures.

Extract Frames accepts JPEG, PNG, WEBP, GIF, AVIF, TIFF, SVG, SVGZ, BMP, ICO, APNG, PNM and 9 more. You can send several files in one request.

Extract Frames is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/images/frames with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.