Please bookmark this page to avoid losing your image tool!

Image Mirror 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, direction = 'horizontal') {
    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    
    const ctx = canvas.getContext('2d');
    
    // Normalize parameter
    direction = direction.toString().toLowerCase().trim();
    
    // Setup mirroring transformation based on the direction parameter
    if (direction === 'horizontal') {
        // Flips left-to-right
        ctx.translate(canvas.width, 0);
        ctx.scale(-1, 1);
    } else if (direction === 'vertical') {
        // Flips top-to-bottom
        ctx.translate(0, canvas.height);
        ctx.scale(1, -1);
    } else if (direction === 'both') {
        // Flips both horizontally and vertically
        ctx.translate(canvas.width, canvas.height);
        ctx.scale(-1, -1);
    }
    
    // Draw the image onto the transformed context
    ctx.drawImage(originalImg, 0, 0);
    
    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 Mirror Tool allows users to flip images either horizontally, vertically, or both simultaneously. This tool is useful for correcting the orientation of photos, creating symmetrical patterns, or adjusting the composition of images for creative design projects and social media content.

Leave a Reply

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