Please bookmark this page to avoid losing your image tool!

Image Enlarger 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, scaleFactor = 2, smoothing = "true") {
    // Ensure the scale factor is a valid positive number
    let scale = parseFloat(scaleFactor);
    if (isNaN(scale) || scale <= 0) {
        scale = 2; // Default to 2x enlargement if invalid
    }

    // Calculate new dimensions
    const newWidth = Math.floor(originalImg.width * scale);
    const newHeight = Math.floor(originalImg.height * scale);

    // Create canvas
    const canvas = document.createElement('canvas');
    canvas.width = newWidth;
    canvas.height = newHeight;

    const ctx = canvas.getContext('2d');

    // Parse smoothing parameter
    const isSmoothingEnabled = smoothing.toLowerCase() === "true";
    ctx.imageSmoothingEnabled = isSmoothingEnabled;
    
    if (isSmoothingEnabled) {
        ctx.imageSmoothingQuality = 'high';
    }

    // Draw the enlarged image onto the canvas
    ctx.drawImage(originalImg, 0, 0, newWidth, newHeight);

    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 Enlarger Tool allows users to increase the dimensions of an image by a specified scale factor. It features an option to enable high-quality smoothing to help maintain visual clarity during the enlargement process. This tool is useful for resizing small images for larger displays, preparing low-resolution graphics for print, or scaling up assets for web design projects.

Leave a Reply

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