Please bookmark this page to avoid losing your image tool!

Image Lunch Generator

(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 = "ОБЕД", position = "bottom", fontSizePercent = 20, textColor = "#ffffff", strokeColor = "#000000") {
    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 actual font size based on image height and the percentage parameter
    const fontSize = Math.max(canvas.height * (fontSizePercent / 100), 10);
    
    // Set typical meme text styling
    ctx.font = `bold ${fontSize}px Impact, Arial Black, sans-serif`;
    ctx.textAlign = 'center';
    ctx.textBaseline = 'middle';
    
    ctx.fillStyle = textColor;
    ctx.strokeStyle = strokeColor;
    ctx.lineWidth = Math.max(fontSize * 0.08, 1);
    
    // Determine the position for the text
    const x = canvas.width / 2;
    let y;
    
    if (position.toLowerCase() === 'top') {
        y = fontSize;
    } else if (position.toLowerCase() === 'center') {
        y = canvas.height / 2;
    } else { // Default defaults to 'bottom'
        y = canvas.height - fontSize;
    }
    
    // Draw outline and fill text
    const textToDraw = text.toUpperCase();
    ctx.strokeText(textToDraw, x, y);
    ctx.fillText(textToDraw, 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 Lunch Generator is a tool designed to overlay customizable text onto images, similar to the style used in popular internet memes. Users can add text to the top, center, or bottom of an image, with options to adjust the font size, text color, and outline color to ensure readability. This tool is ideal for creating quick social media posts, personalized lunch-themed memes, or adding humorous captions to your photos.

Leave a Reply

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