About this tool
This tool puts many small pictures, such as icons or animation frames, into one big picture called a sprite sheet. Each picture gets an equal cell, and you choose how many columns there are, the cell size and the background colour. You also get a list that says where each picture sits on the sheet. It takes up to 100 pictures.
For example, you combine 20 small icons into one file so a website or game loads them in one go.
How to use it
- Choose this tool.
- Add your pictures with Upload or drag and drop (up to 100).
- Choose the number of columns and, if you like, the cell width and height.
- Choose a background colour.
- Press Generate, then download the sheet and the list of positions.
What you get back
You get one big picture with all your pictures laid out in a grid, plus a list of where each one is. Download both.
GOOD TO KNOW
Zero spacing; the response includes the per-image coordinate manifest.
TEST IT LIVE
Try Sprite Sheet in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/sprite-sheet
Tool ID
images.sprite-sheet
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/sprite-sheet" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'images=@photo.jpg' \
-F 'cols=1' \
-F 'cellWidth=1' \
-F 'cellHeight=1'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.spriteSheet({
"images": 'photo.jpg',
"cols": 1,
"cellWidth": 1,
"cellHeight": 1
});
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()->spriteSheet([
'images' => 'photo.jpg',
'cols' => 1,
'cellWidth' => 1,
'cellHeight' => 1,
]);
echo $result->requestId;More in Images
