Please bookmark this page to avoid losing your image tool!

Photo Full Spectrum Filter Effect 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) {
    const canvas = document.createElement('canvas');
    // Using { willReadFrequently: true } can be a hint for performance optimization
    // if getImageData/putImageData are used frequently, though here it's once per call.
    const ctx = canvas.getContext('2d', { willReadFrequently: true });

    // Use naturalWidth and naturalHeight to get the intrinsic dimensions of the image.
    // originalImg.width/height might reflect CSS dimensions if it's an <img> element from the DOM.
    // For an Image object created via `new Image()`, .width and .height are typically
    // the natural dimensions once the image is loaded.
    const imgWidth = originalImg.naturalWidth || originalImg.width;
    const imgHeight = originalImg.naturalHeight || originalImg.height;

    canvas.width = imgWidth;
    canvas.height = imgHeight;

    // Draw the original image onto the canvas
    ctx.drawImage(originalImg, 0, 0, imgWidth, imgHeight);

    // Get the ImageData object. Note: This can throw a SecurityError if the image
    // is loaded from a different origin without CORS headers, tainting the canvas.
    // The problem description implies a working scenario, so error handling for this
    // is omitted for brevity.
    const imageData = ctx.getImageData(0, 0, imgWidth, imgHeight);
    const data = imageData.data; // This is a Uint8ClampedArray: [R, G, B, A, R, G, B, A, ...]

    // Iterate over each pixel in the image. Each pixel consists of 4 components (R, G, B, A).
    for (let i = 0; i < data.length; i += 4) {
        const r = data[i];     // Original Red value
        const g = data[i + 1]; // Original Green value
        const b = data[i + 2]; // Original Blue value
        // const a = data[i + 3]; // Original Alpha value (opacity), remains unchanged

        // Apply a "Full Spectrum Filter Effect".
        // A common digital simulation for effects like false-color infrared (e.g., Kodak Aerochrome style)
        // involves swapping color channels. Here, we'll swap the Red and Green channels.
        // - New Red channel value becomes the original Green channel value.
        // - New Green channel value becomes the original Red channel value.
        // - Blue channel remains unchanged.
        // This transformation typically results in:
        //   - Green elements (like foliage) appearing red.
        //   - Red elements appearing green.
        //   - Blue elements (like skies, water) remaining blue.
        
        data[i]     = g; // Set the new Red component to the original Green value
        data[i + 1] = r; // Set the new Green component to the original Red value
        data[i + 2] = b; // Blue component remains unchanged
        // Alpha component (data[i + 3]) also remains unchanged.
    }

    // Put the modified image data back onto the canvas
    ctx.putImageData(imageData, 0, 0);

    // Return the canvas element with the processed 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 Photo Full Spectrum Filter Effect Tool allows users to apply a unique filter effect to images, transforming their colors for artistic and creative purposes. This tool swaps the red and green color channels of the original image, resulting in a visually striking effect where green elements appear red, and red elements appear green, while blue elements remain unchanged. It is ideal for photographers, digital artists, and anyone looking to create distinctive and vibrant visuals from their images, making it particularly useful for creative projects, social media posts, or digital art transformations.

Leave a Reply

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

Other Image Tools:

Image Motion Blur Filter Effect Tool

Image Panavision Film Look Filter Effect Tool

Image Rolleiflex TLR Camera Filter Effect Tool

Image Lee 85B Warming Filter Effect Application

Image Tiffen Black Pro-Mist Filter Effect Tool

Image Fomapan 100 Filter Effect Application

Image Lens Flare Filter Effect Tool

Image Ilford XP2 Super Filter Effect Application

Image Cinemascope Filter Effect Applicator

Image Dubblefilm Solar Filter Effect Application

Image Night Vision Filter Effect Tool

Image Tintype Filter Effect Application

Image Color Graduated Filter Effect Tool

Image Agfa Vista Filter Effect Application

Image Schneider Hollywood Black Magic Filter Effect Tool

Image TMax 400 Filter Effect Tool

Image Double Exposure Filter Effect Tool

Image Fujichrome Velvia 50 Filter Effect Application

Image Revolog Texture Film Filter Effect Tool

Image Lomography Metropolis Filter Effect Application

Image Variable ND Filter Effect Tool

Image 8mm Movie Film Filter Effect Application

Image TMax 100 Filter Effect Application

Image Fog Filter Effect Tool

Image Ektachrome E100 Filter Effect Application

Image RED Cinema Camera Filter Effect Tool

Image Reverse Graduated ND Filter Effect Tool

Image Kaleidoscope Filter Effect Tool

Image Platinum Palladium Print Filter Effect

Image Light Leak Filter Effect Tool

Image Moire Pattern Filter Effect Tool

Image Pull Processing Filter Effect Tool

Photo Ambrotype Filter Effect Tool

Image Cross-Screen Star Filter Effect Tool

Image Tiffen Ultra Contrast Filter Effect Application

Photo Telephoto Lens Compression Filter Effect Tool

See All →