Please bookmark this page to avoid losing your image tool!

Image Text Adder Tool

(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, text = "Movies", fontSize = 48, fontColor = "#FFFFFF", xPercent = 50, yPercent = 85) {
    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    const ctx = canvas.getContext('2d');

    // Draw the original image onto the canvas
    ctx.drawImage(originalImg, 0, 0);

    // Calculate position based on percentages
    const x = (canvas.width * Math.max(0, Math.min(100, xPercent))) / 100;
    const y = (canvas.height * Math.max(0, Math.min(100, yPercent))) / 100;

    // Configure text styling
    ctx.font = `bold ${fontSize}px Arial, sans-serif`;
    ctx.fillStyle = fontColor;
    ctx.textAlign = "center";
    ctx.textBaseline = "middle";

    // Text shadow for better visibility on dark/light intersecting backgrounds
    ctx.shadowColor = "rgba(0, 0, 0, 0.75)";
    ctx.shadowBlur = 5;
    ctx.shadowOffsetX = 2;
    ctx.shadowOffsetY = 2;

    // Draw black outline (stroke)
    ctx.lineWidth = Math.max(2, fontSize / 12);
    ctx.strokeStyle = "#000000";
    ctx.strokeText(text, x, y);

    // Remove shadow for the fill so it doesn't blur inside the text itself
    ctx.shadowColor = "transparent";
    
    // Draw the actual text color
    ctx.fillText(text, x, y);

    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 Text Adder Tool allows you to overlay custom text onto your images. You can customize the text content, font size, and color, as well as specify the exact positioning using percentage-based coordinates. The tool automatically applies a shadow and a black outline to the text to ensure it remains legible against various image backgrounds. This tool is useful for creating watermarks, adding captions to photos, generating social media graphics, or labeling images for presentations.

Leave a Reply

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