Dev.to WebDev 🛠 Dev 👁 0 📖 1 min read

How to Merge Images Vertically, Horizontally, or in a Collage Without Uploading (HTML5 Canvas + HEIC)

Need to stitch two or more screenshots vertically, put before/after photos side-by-side, or build a 2×2 collage—without uploading private receipts, ID scans, or iPhone photos to a random server? We just shipped the KitW

Need to stitch two or more screenshots vertically, put before/after photos side-by-side, or build a 2×2 collage—without uploading private receipts, ID scans, or iPhone photos to a random server?

We just shipped the KitWharf Image Merger & Collage Maker (built from a community feature request) so everything executes 100% locally in browser RAM.

How Client-Side Stitching & Auto-Alignment Works

Instead of sending files to a remote ImageMagick backend, the browser's HTML5 2D Canvas API handles scaling, rotation, color filters, and compositing locally:

  1. HEIC Decoding in WebAssembly: Apple .heic / .heif photos are decoded client-side via heic2any (with a heic-decode WASM fallback) before entering the Canvas pipeline.
  2. Proportional Dimension Matching: When combining mixed-aspect screenshots (3:2 + 4:3 + mobile 9:16), Vertical mode scales every frame to match a target width, Horizontal mode normalizes heights, and Grid/Collage modes center-crop each cell uniformly so rows and columns stay flush.
  3. Per-Image 90° Rotation & Color Adjustments: Canvas transforms (ctx.translate, ctx.rotate) and ctx.filter apply brightness, contrast, and saturation cleanly in one pass before exporting lossless PNG (with optional transparency), JPG, or WebP.

Try It Free (Zero Login, Zero Watermarks)

What image or PDF workflow do you still rely on desktop software for that you'd love to see run 100% in your browser?

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.