Please bookmark this page to avoid losing your image tool!

Photo Text Sticker Overlay 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, stickerText = "Любимый предмет", position = "bottom-right", stickerColor = "#ff4757", rotationAngle = -10) {
    // Create canvas
    const canvas = document.createElement("canvas");
    const ctx = canvas.getContext("2d");

    // Match canvas dimensions to the original image
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;

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

    // Determine font size relative to image size
    const fontSize = Math.max(20, Math.floor(canvas.width / 15));
    ctx.font = `bold ${fontSize}px 'Arial Black', Impact, sans-serif`;

    // Measure text to determine sticker size
    const metrics = ctx.measureText(stickerText);
    const padding = fontSize * 0.6;
    const boxWidth = metrics.width + padding * 2;
    const boxHeight = fontSize + padding * 2;
    const borderRadius = fontSize * 0.5;

    // Set a margin from the edges
    const margin = Math.max(20, canvas.width * 0.05);
    
    // Calculate center coordinates for the sticker based on position
    let cx, cy;
    switch(position.toLowerCase()) {
        case "top-left":
            cx = margin + boxWidth / 2;
            cy = margin + boxHeight / 2;
            break;
        case "top-right":
            cx = canvas.width - margin - boxWidth / 2;
            cy = margin + boxHeight / 2;
            break;
        case "bottom-left":
            cx = margin + boxWidth / 2;
            cy = canvas.height - margin - boxHeight / 2;
            break;
        case "center":
            cx = canvas.width / 2;
            cy = canvas.height / 2;
            break;
        case "bottom-right":
        default:
            cx = canvas.width - margin - boxWidth / 2;
            cy = canvas.height - margin - boxHeight / 2;
            break;
    }

    // Save context state before applying transformations
    ctx.save();
    
    // Move to the designated center, apply rotation
    ctx.translate(cx, cy);
    ctx.rotate(Number(rotationAngle) * Math.PI / 180);

    // Add a subtle drop shadow to the sticker background
    ctx.shadowColor = "rgba(0, 0, 0, 0.4)";
    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 3;
    ctx.shadowOffsetY = 5;

    // Draw the sticker background (Rounded Rectangle)
    ctx.beginPath();
    const rx = -boxWidth / 2;
    const ry = -boxHeight / 2;
    if (ctx.roundRect) {
        ctx.roundRect(rx, ry, boxWidth, boxHeight, borderRadius);
    } else {
        // Fallback for browsers that don't support roundRect
        ctx.moveTo(rx + borderRadius, ry);
        ctx.lineTo(rx + boxWidth - borderRadius, ry);
        ctx.quadraticCurveTo(rx + boxWidth, ry, rx + boxWidth, ry + borderRadius);
        ctx.lineTo(rx + boxWidth, ry + boxHeight - borderRadius);
        ctx.quadraticCurveTo(rx + boxWidth, ry + boxHeight, rx + boxWidth - borderRadius, ry + boxHeight);
        ctx.lineTo(rx + borderRadius, ry + boxHeight);
        ctx.quadraticCurveTo(rx, ry + boxHeight, rx, ry + boxHeight - borderRadius);
        ctx.lineTo(rx, ry + borderRadius);
        ctx.quadraticCurveTo(rx, ry, rx + borderRadius, ry);
        ctx.closePath();
    }
    
    // Fill the background
    ctx.fillStyle = stickerColor;
    ctx.fill();

    // Reset shadow for the border
    ctx.shadowColor = "transparent";

    // Draw sticker border (white rim)
    ctx.lineWidth = Math.max(3, fontSize * 0.1);
    ctx.strokeStyle = "#ffffff";
    ctx.stroke();

    // Draw the sticker text
    ctx.fillStyle = "#ffffff";
    ctx.textAlign = "center";
    ctx.textBaseline = "middle";
    
    // Inner text shadow for depth
    ctx.shadowColor = "rgba(0,0,0,0.5)";
    ctx.shadowBlur = 4;
    ctx.shadowOffsetX = 2;
    ctx.shadowOffsetY = 2;
    
    // Render text slightly adjusted to account for center baseline visually
    ctx.fillText(stickerText, 0, fontSize * 0.05);

    // Restore context state
    ctx.restore();

    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 Photo Text Sticker Overlay Tool allows you to add stylized text stickers to your images. Users can customize the sticker’s text, background color, and placement (such as top-left, center, or bottom-right) to create a unique look. The tool automatically applies a rounded background, a white border, and a slight rotation to give the text a realistic sticker appearance with depth. This is ideal for creating social media posts, watermarking photos with catchy labels, or adding decorative elements to personal photography.

Leave a Reply

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

Other Image Tools:

Teeth Photo and Drawing Generator

Image Drawing Game Generator

No valid description provided for an image utility tool

Unrecognized Description

Image Search Tool for Cookies Cartoons and Medicinal Mud

Image Text Label Adder

Image Bouquet and Calm Theme Creator

Image From Text Prompt Generator

Image Gingerbread/Wish/Spoon Sticker Adder

Big Hero 6 The Series AU Image Replacer

Image Big Hero 6 To Big Hero 6 The Series AU Replacer

Audio and Video Big Hero 6 Series Alternate Universe Replacement Tool

Big Hero 6 The Series Alternate Universe Audio and Video Replacer Tool

Audio and Video Big Hero 6 Alternate Universe Replacement Tool

Ice Age 2002 Nogai Dub Cast Information Tool

Audio File of Universal Pictures David Newman Fanfare

Audio to Image Fanfare Generator

Audio File Not Supported

Universal Pictures David Newman Fanfare Image

The Walt Disney Company Sound Effects Library

Photo I Killed X Losky Effect Applicator

Image I Killed X Losky Effect Hue Tool

Image Hue Adjustment Tool for I Killed Losky Effect

I Killed Losky Image Effect Generator

Big Hero 6 To Big Hero 6 The Series AU Image Replacer

Big Hero 6 The Series AU Image Generator

Website Favicon and Logo PNG Generator Tool

Image PNG Logo Studio And Website Icon Text Finder

Website Icon and Logo Image Studio Maker

Image To Gold Effect Filter

Roblox Army RP Document Image ID Finder

Game Image ID Finder

Image To Paint By Number Converter

Image To Website Interface Finder

Image To Movie Description Text Generator

Movie Scene Text Extractor from Image

See All →