Please bookmark this page to avoid losing your image tool!

Image Logo Maker

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(
    originalImg,
    logoText = "MY LOGO",
    shape = "circle", // "circle", "square", "rounded"
    textPosition = "bottom", // "top", "bottom", "center", "none"
    borderWidth = 15,
    borderColor = "#2c3e50",
    textColor = "#ffffff",
    textOutlineColor = "#000000",
    fontFamily = "Arial, Helvetica, sans-serif"
) {
    // Coerce numeric inputs
    borderWidth = Number(borderWidth);

    // Setup canvas
    const canvas = document.createElement("canvas");
    const size = 600; // Logos are typically square, setting a fixed 600x600 size
    canvas.width = size;
    canvas.height = size;
    const ctx = canvas.getContext("2d");

    // Calculation variables
    const cx = size / 2;
    const cy = size / 2;
    const padding = borderWidth / 2;
    const radius = cx - padding;
    const boxSize = size - borderWidth;

    // Helper to draw a rounded rectangle
    const drawRoundedRect = (x, y, w, h, r) => {
        ctx.beginPath();
        ctx.moveTo(x + r, y);
        ctx.lineTo(x + w - r, y);
        ctx.quadraticCurveTo(x + w, y, x + w, y + r);
        ctx.lineTo(x + w, y + h - r);
        ctx.quadraticCurveTo(x + w, y + h, x + w - r, y + h);
        ctx.lineTo(x + r, y + h);
        ctx.quadraticCurveTo(x, y + h, x, y + h - r);
        ctx.lineTo(x, y + r);
        ctx.quadraticCurveTo(x, y, x + r, y);
        ctx.closePath();
    };

    // Helper to form the chosen shape path
    const drawShape = () => {
        if (shape === "circle") {
            ctx.beginPath();
            ctx.arc(cx, cy, radius, 0, Math.PI * 2);
            ctx.closePath();
        } else if (shape === "rounded") {
            drawRoundedRect(padding, padding, boxSize, boxSize, radius * 0.4);
        } else { // Square
            ctx.beginPath();
            ctx.rect(padding, padding, boxSize, boxSize);
            ctx.closePath();
        }
    };

    ctx.save();
    
    // Create the path for the shape and clip the canvas
    drawShape();
    ctx.clip();

    // Fill background (useful if the uploaded image has transparency)
    ctx.fillStyle = "#ffffff";
    ctx.fill();

    // Calculate dimensions to maintain aspect ratio (Object-fit: cover)
    const iw = originalImg.width;
    const ih = originalImg.height;
    const scale = Math.max(size / iw, size / ih);
    const sw = iw * scale;
    const sh = ih * scale;
    const ox = (size - sw) / 2;
    const oy = (size - sh) / 2;

    // Draw original image covering the whole shape
    ctx.drawImage(originalImg, ox, oy, sw, sh);

    // Restore to unclip the canvas so we can safely draw borders and text
    ctx.restore();

    // Draw the border
    if (borderWidth > 0) {
        drawShape();
        ctx.lineWidth = borderWidth;
        ctx.strokeStyle = borderColor;
        ctx.stroke();
    }

    // Add Logo Text
    if (textPosition !== "none" && logoText.trim().length > 0) {
        // Base Font size setup
        let fontSize = Math.floor(size * 0.13); // ~78px
        ctx.font = `900 ${fontSize}px ${fontFamily}`;
        
        // Dynamically scale down font if text is too long
        const maxWidth = size * 0.8;
        const textMetrics = ctx.measureText(logoText);
        if (textMetrics.width > maxWidth) {
            fontSize = Math.floor(fontSize * (maxWidth / textMetrics.width));
            ctx.font = `900 ${fontSize}px ${fontFamily}`;
        }

        ctx.textAlign = "center";
        ctx.textBaseline = "middle";

        let tx = cx;
        let ty = cy;

        const verticalMargin = fontSize * 0.8;

        // Position text configuration
        if (textPosition === "top") {
            ty = padding + verticalMargin;
            if (shape === "circle") ty += verticalMargin * 0.4;
        } else if (textPosition === "bottom") {
            ty = size - padding - verticalMargin;
            if (shape === "circle") ty -= verticalMargin * 0.4;
        }

        // Add heavy stroke for high readability on messy backgrounds
        ctx.lineWidth = Math.max(3, fontSize * 0.18);
        ctx.lineJoin = "round";
        ctx.strokeStyle = textOutlineColor;
        ctx.strokeText(logoText, tx, ty);

        // Fill inner text
        ctx.fillStyle = textColor;
        ctx.fillText(logoText, tx, ty);
    }

    return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

The Image Logo Maker is a tool designed to transform standard images into stylized logos. It allows users to crop images into various geometric shapes such as circles, squares, or rounded rectangles, and apply customizable borders with adjustable thickness and color. Additionally, users can overlay custom text onto their images, with options to control text positioning, font styles, colors, and outlines to ensure readability. This tool is ideal for creating social media profile pictures, brand icons, watermarks, or custom avatars for websites and digital platforms.

Leave a Reply

Your email address will not be published. Required fields are marked *

Other Image Tools:

YouTube Video Player

Xiaomi Redmi Mi Image Tool

Xiaomi Redmi Mi Topic Image Search Tool

Image Visual Search and Object Recognition Tool

Movie Image To Google Lens Converter

Image Language Converter

Mp4 To Photo Converter

MP4 To Audio Converter

Image To Mp3 Audio Converter

Image Translator Database Downloader Tool

Android Ringtone MP3 Photo and Music Player

Android Telephone Ringtone Image Generator

Glitch Video Editor

Glitch Video Load Editor

Octoblock Major Image Effect Generator

Text Extraction From Pixar Animation Credits Image

Sohone Major Image Effect Generator

Glim Major Image Effect Generator

Mune Major Image Effect Generator

Image Color To Grey Filter Viewer

Website To Image Screenshot Capture Tool

Mina-Girl Major Image Effect Generator

Vita-Boy Major Image Effect Generator

Cringle Major Image Effect Generator

Batch Chroma Key Background Remover and Green Spill Eliminator

Photo Background and Green Particle Remover While Preserving Hair

Photorealistic California Driver License Generator

California Driver’s License Photorealistic Image Generator

California Driver License Photorealistic Image Generator

Photorealistic California Driver’s License Image Generator

California Driver’s License Security Template Generator

Blank California Driver License Security Background Template Creator

California State Driver License Image Creator

California Driver License Realism Enhancer

California State ID Card Generator Tool

California State ID Card Generator for Ronald Sanchez

See All →