How does dimension matching prevent aspect distortion?
Proportional dimension matching scales uneven photos along their shared axis so the other axis adjusts at the exact source ratio instead of stretching faces or text. Decoding via the MDN Window.createImageBitmap() specification reads real image bounds locally before merging shots offline with zero server uploads.
When teams combine images from before-and-after screenshots or mixed portrait-and-landscape mobile frames, naive canvas tools squeeze rectangles to identical bounds and ruin proportions. By locking the aspect ratio during resizing, every panel keeps natural geometry cleanly inside 8 px gaps and 12 px outer margins.
Every uploaded picture keeps native orientation metadata decoded upfront so tall mobile shots and wide desktop captures share balanced margins. Previewing combined dimensions live makes layout spacing immediately clear before saving local files.
Important: Keeping
Keep original sizesenabled avoids resampling altogether. Shorter frames stay at full 1:1 resolution and align vertically or horizontally usingCenter,Start, orEndrules.
Sideways smartphone photos sometimes retain EXIF rotation flags that show rotated dimensions once pixel buffers decode. Fix misaligned captures upfront when you rotate sideways screenshots upright before stitching so every horizontal strip reads level.
Configuring layout direction, spacing, and transparency
Two primary orientations organize panel flow cleanly while worker spacing controls frame every border. Before dropping mixed browser downloads onto the strip, run browser-saved JFIF to JPG normalization if older screenshots carry unrecognized extensions.
Horizontal strips versus vertical scroll stacks
Selecting Side by side (Horizontal) places panels left to right along a single row, matching cross-axis heights when dimension matching is active. Switching to Stacked (Vertical) orders panels top to bottom in a scrolling column, matching panel widths instead.
Clicking Load sample pair inserts a 320 px by 240 px before frame next to a 280 px by 220 px after frame so you can watch layout math update immediately. Panel rows include dedicated Up, Down, and Remove actions for instant sequencing adjustments.
Gap, outer padding, and Porter-Duff alpha blending
Two numeric sliders adjust Gap between images and Outer padding from 0 px to 64 px in crisp 2 px steps, defaulting to an 8 px inner gutter and 12 px frame margin. Unchecking Transparent canvas fills margins with #ffffff or any custom hex backdrop.
Overlay pixels blend onto the background using standard source-over alpha math defined by the W3C Compositing and Blending Level 1 source-over specification. Straight alpha blending computes blended channels accurately without darkening semi-transparent screenshot drop shadows against white or transparent canvases.
Safe 8192 px canvas clamping for high-DPI photos
Combining ten 4K captures side by side can demand tens of thousands of pixels and exhaust browser tab allocations. Whenever total width or height exceeds MAX_OUTPUT_SIDE at 8192 px, the worker applies a uniform proportional downscale factor across all panels, inner gaps, and outer margins.
- Predictable output bounds: Even extreme multi-panel stacks stay bounded below
8192 pxon the longest side to prevent silent GPU canvas failure. - Preserved spacing ratio: Gaps and outer padding shrink by the identical ratio as image frames, keeping border proportions intact.
- Exact copy bypass: Smaller pairs below
8192 pxthat share matching heights never invoke bilinear resizing or clamping math.
Dimension matching, alignment, and format tradeoffs
Choosing the right scaling mode prevents blurry UI captures while controlling overall export dimensions. Re-encoding to lossy JPEG or WebP uses the browser MDN HTMLCanvasElement.toBlob() method at a fixed 92% quality target.
| Dimension matching mode | Cross-axis rule | Upscaling risk | Resolution effect | Ideal stitch workflow |
|---|---|---|---|---|
| Match smallest | Shrinks taller or wider frames to shortest panel | None (downscales only) | Compact, ultra-sharp text edges | Mixing high-DPI phone and desktop screenshots |
| Match largest | Expands smaller frames up to largest panel | Can soften low-res screenshots | Uniform full-size strip | Enlarging smaller thumbnails to match a hero frame |
| Match first image | Scales frames 2 through 10 to match panel 1 | Depends on panel 1 size | Predictable anchor scale | Setting a strict template width via the first upload |
| Keep original sizes | Zero scaling; aligns unscaled panels via Alignment | None (1:1 native pixels) | Mixed edges framed by backdrop | Pixel-accurate UI sprites and side-by-side audits |
Product teams assembling comparative badge charts sometimes unpack software asset icons alongside screenshots beforehand. Dedicated multi-size ICO icon extraction to PNG ensures every favicon or app icon decodes cleanly before lining frames up side by side.
Stitching crisp screenshots and before-and-after pairs
Choosing between lossless PNG and compressed JPEG or WebP depends heavily on whether your panels contain razor-sharp text or continuous photography. Notice that exported filenames include output pixel dimensions directly in the format combined-<width>x<height>.<ext> for quick verification.
Choosing PNG, JPG, or WebP for crisp UI text
Screenshots showing dashboard tables, code diffs, or mobile typography look sharpest in PNG (Lossless) following the W3C PNG Third Edition lossless specification. Lossless deflate encoding avoids chroma ringing around thin gray fonts and preserves alpha channels whenever Transparent canvas stays active.
Pick WebP (.webp) when combining five or more high-resolution photographs for blog articles where 92% lossy compression cuts file sizes sharply while preserving alpha transparency. Choose JPEG (.jpg) only with solid Background colors for portrait comparisons shared on legacy messaging platforms.
Panel ordering, privacy hygiene, and 10-image limits
Sequential ordering happens strictly inside browser state so rearranging frames 1 through 10 never re-uploads files or wastes bandwidth. Sensitive receipts, front-and-back ID cards, and unreleased app mockups stay confined inside local browser RAM from upload through Download PNG.
- Strip limits: Keep individual strips between 2 and 10 panels; split longer comic chapters into numbered batches before archiving.
- Matrix collages: Linear strips work along one horizontal or vertical axis, so switch to multi-row photo grids ready for print when arranging multi-column albums.