Please bookmark this page to avoid losing your image tool!

Image Flip And 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, flipMode = 'horizontal') {
    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    
    const ctx = canvas.getContext('2d');
    
    let scaleX = 1;
    let scaleY = 1;
    let translateX = 0;
    let translateY = 0;
    
    // Determine the type of flip from the parameter ('horizontal', 'vertical', or 'both')
    const mode = String(flipMode).toLowerCase().trim();
    
    if (mode === 'horizontal' || mode === 'both') {
        scaleX = -1;
        translateX = canvas.width;
    }
    
    if (mode === 'vertical' || mode === 'both') {
        scaleY = -1;
        translateY = canvas.height;
    }
    
    // Apply transformations
    ctx.translate(translateX, translateY);
    ctx.scale(scaleX, scaleY);
    
    // Draw the flipped image onto the canvas
    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 Flip and Mirror Tool allows users to reflect images across different axes. It provides options to flip an image horizontally, vertically, or both simultaneously. This tool is useful for correcting the orientation of photos, creating symmetrical patterns, or adjusting selfies and product images for better visual composition in graphic design and social media content.

Leave a Reply

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