About this tool
This tool cuts a single picture into a grid of equal pieces. You choose how many columns and how many rows. Each piece is saved as its own picture. It takes one picture at a time.
For example, you cut a wide photo into three equal pieces to post as a swipeable set of social media slides.
How to use it
- Choose this tool.
- Add one picture with Upload or drag and drop.
- Type how many columns and how many rows you want.
- Press Generate.
- Download the pieces one by one, or all together if a ZIP is offered.
What you get back
You get one new picture for every piece of the grid, ready to download.
TEST IT LIVE
Try Slice into Grid 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/slice
Tool ID
images.slice
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/slice" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'images=@photo.jpg' \
-F 'cols=1' \
-F 'rows=1' \
-F 'output_bundle=zip'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.slice({
"images": 'photo.jpg',
"cols": 1,
"rows": 1,
"output_bundle": "zip"
});
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()->slice([
'images' => 'photo.jpg',
'cols' => 1,
'rows' => 1,
'output_bundle' => 'zip',
]);
echo $result->requestId;More in Images
