cai13808519901-cpuHave you ever needed to quickly convert a portrait photo to landscape format — maybe for a YouTube...
Have you ever needed to quickly convert a portrait photo to landscape format — maybe for a YouTube thumbnail, a LinkedIn banner, or a presentation slide — but didn't want to upload your personal photos to some random website?
That's exactly the problem I solved with Image Landscape Converter.
Most online image tools work by uploading your file to a server, processing it there, and sending it back. This creates three problems:
My approach: do everything in the browser using the Canvas API.
The entire conversion pipeline runs client-side:
function convertToLandscape(imageFile, targetRatio = '16:9') {
return new Promise((resolve) => {
const img = new Image();
img.onload = () => {
const canvas = document.createElement('canvas');
const [w, h] = targetRatio.split(':').map(Number);
const outputWidth = Math.max(img.width, img.height * (w / h));
const outputHeight = outputWidth * (h / w);
canvas.width = outputWidth;
canvas.height = outputHeight;
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#000000';
ctx.fillRect(0, 0, outputWidth, outputHeight);
const x = (outputWidth - img.width) / 2;
const y = (outputHeight - img.height) / 2;
ctx.drawImage(img, x, y);
resolve(canvas.toDataURL('image/jpeg', 0.92));
};
img.src = URL.createObjectURL(imageFile);
});
}
The most popular feature is the "blur fill" background — instead of black bars, the image edges are extended with a blurred version of itself:
function applyBlurFill(ctx, img, outputWidth, outputHeight) {
const scale = Math.max(outputWidth / img.width, outputHeight / img.height);
const bgW = img.width * scale;
const bgH = img.height * scale;
ctx.filter = 'blur(20px)';
ctx.drawImage(img, (outputWidth - bgW) / 2, (outputHeight - bgH) / 2, bgW, bgH);
ctx.filter = 'none';
ctx.drawImage(img, (outputWidth - img.width) / 2, (outputHeight - img.height) / 2);
}
1. The Canvas API is incredibly powerful — but also quirky:
ctx.filter isn't supported in all browsers (Firefox had issues)2. Privacy is a real selling point — many users specifically mention "no uploads" in reviews. People care about where their photos go.
3. Browser-native tools can be competitive — no backend, no database, no server costs. The whole thing is stateless.
👉 imagelandscapeconverter.online — free, no signup, works offline after first load.
Built with Next.js + TypeScript + Canvas API.
What other browser-native tools do you think are worth building? Drop ideas in the comments!