Please bookmark this page to avoid losing your image tool!

Image Mysterious Misty Filter Applicator

(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, blurAmount = 3, mistOpacity = 0.2, saturation = 0.8) {
    // Create a new canvas element
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');

    // Get the original image dimensions
    const w = originalImg.naturalWidth;
    const h = originalImg.naturalHeight;

    // Set the canvas dimensions to match the image
    canvas.width = w;
    canvas.height = h;

    // --- Filter Application ---
    // Sanitize input values to ensure they are within a reasonable range.
    const clampedBlur = Math.max(0, blurAmount);
    const clampedOpacity = Math.max(0, Math.min(1, mistOpacity));
    const clampedSaturation = Math.max(0, saturation);

    // Apply multiple filters at once for blur and desaturation.
    // This gives the image a dreamy, slightly faded look.
    ctx.filter = `blur(${clampedBlur}px) saturate(${clampedSaturation})`;

    // Draw the original image onto the canvas. The filters will be applied during this step.
    ctx.drawImage(originalImg, 0, 0);

    // --- "Misty" Overlay ---
    // Reset the filter so the misty overlay itself is not blurred or desaturated.
    ctx.filter = 'none';

    // Set the global alpha (opacity) for the misty layer.
    ctx.globalAlpha = clampedOpacity;

    // Set the fill style to a light, misty color (e.g., white or a very light grey).
    ctx.fillStyle = '#f0f4f8';

    // Draw a rectangle covering the entire canvas to create the misty effect.
    ctx.fillRect(0, 0, w, h);

    // Reset globalAlpha to its default value for any subsequent drawing operations.
    ctx.globalAlpha = 1.0;

    // Return the canvas element with the filtered image
    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 Mysterious Misty Filter Applicator is a tool designed to enhance images by applying a dreamy, misty effect. This filter can be used to create a soft blur, adjust the saturation, and add a light mist overlay, resulting in a visually appealing and ethereal look. It is ideal for photographers, graphic designers, or anyone looking to add a whimsical touch to their images, whether for social media, personal projects, or artistic creations.

Leave a Reply

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