Please bookmark this page to avoid losing your image tool!

Image “Мальчики подождут” Text Adder

(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 = "Мальчики подождут", fontSizePct = 10, color = "white", strokeColor = "black", strokeWidth = 3, positionY = 85) {
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');

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

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

    // Calculate font size based on image height
    const fontSize = Math.max(10, Math.floor((fontSizePct / 100) * canvas.height));

    // Configure text styles
    ctx.font = `bold ${fontSize}px Impact, "Arial Black", Arial, sans-serif`;
    ctx.textAlign = 'center';
    ctx.textBaseline = 'middle';

    // Calculate X and Y positions
    const x = canvas.width / 2;
    const y = (positionY / 100) * canvas.height;
    
    // Add 5% padding on both sides to prevent text from touching the edge
    const maxTextWidth = canvas.width * 0.90;

    // Draw text stroke (outline) for better readability on varied backgrounds
    if (strokeWidth > 0) {
        // Adjust stroke width proportionally to the font size
        ctx.lineWidth = strokeWidth * (fontSize / 50); 
        ctx.lineJoin = 'round';
        ctx.miterLimit = 2;
        ctx.strokeStyle = strokeColor;
        ctx.strokeText(text, x, y, maxTextWidth);
    }

    // Draw text fill
    ctx.fillStyle = color;
    ctx.fillText(text, x, y, maxTextWidth);

    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

This tool allows you to add the specific phrase ‘Мальчики подождут’ to your images. It provides customization options for text size, color, stroke color, and vertical positioning to ensure the text fits your visual style. This can be used to quickly create meme-style images or add stylistic captions to photos for social media sharing.

Leave a Reply

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