How the Seamless Slicing Algorithm Works

Updated October 2026

This site's homepage mentions that slides "line up edge-to-edge" — this page walks through exactly how that's computed, step by step, using the same logic that runs in your browser when you upload an image.

Step 1 — Compute the full composite canvas size

Given your chosen preset (say, Portrait at 1080×1350 per slide) and slide count N, the tool first computes the size of one giant virtual canvas: width = 1080 × N, height = 1350. Every slide will eventually be one equal-width column cut from this single composite — this is the key idea that makes edges line up: all slides are cropped from one continuous image, not cropped independently.

Step 2 — "Cover" crop your source image to fill that canvas

Your uploaded image almost never matches the composite canvas's exact aspect ratio, so the tool computes a center crop that fills the entire canvas with no empty space — the same logic as the CSS background-size: cover property. It scales your image up or down (preserving aspect ratio) until it's at least as large as the canvas in both dimensions, then crops evenly from the center on whichever axis has extra.

Step 3 — Slice the covered image into N equal-width segments

Once the source is scaled and cropped to exactly cover the full composite canvas, that canvas is divided into N vertical strips of exactly equal width: segment width = (cropped source width) / N. Each strip becomes one output slide, rendered onto its own canvas element at the preset's per-slide pixel size.

Why this guarantees seamless edges

Because every slide is a precisely calculated, contiguous slice of the same scaled-and-cropped composite image — not independently cropped or resized — slide 1's rightmost pixel column is adjacent, in the original scaled image, to slide 2's leftmost pixel column, with zero gap or overlap between them. This is what makes consecutive slides line up exactly when swiped in order on Instagram.

The "Fit Original" exception

When you select "Fit Original," there's no cropping step — the composite height is instead derived purely from your source image's own aspect ratio applied to the full composite width, so the entire source image is preserved with no cropped pixels. The slicing step (step 3) works identically either way.

FAQ

Does the algorithm ever distort (stretch) my image?
No — the cover-crop step scales your image proportionally (the same scale factor applied to both width and height), so there's no stretching or squashing, only cropping of whatever doesn't fit the target canvas's aspect ratio.
Why does a very wide source image crop less than a narrow one?
The cover-crop amount depends on how far your source image's own aspect ratio is from the composite canvas's aspect ratio — a naturally wide panoramic image is already close to a multi-slide composite's wide aspect ratio, so less cropping is needed to fill it; a near-square source image needs more aggressive cropping to fill a much wider canvas.

→ Split an image into a carousel (free)