Please bookmark this page to avoid losing your image tool!

Image Singh-Ray Gold-N-Blue Polarizer 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');
    const ctx = canvas.getContext('2d');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;

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

    // Get the image data from the canvas
    const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
    const data = imageData.data; // This is a Uint8ClampedArray: [R, G, B, A, R, G, B, A, ...]

    // Constants defining the Gold-N-Blue polarizer effect.
    // These values are chosen empirically to approximate the visual characteristics
    // of such a filter.

    // For Blue Enhancement:
    // Factor to boost the blue channel in predominantly blue areas (e.g., sky, water).
    const blueIntensity = 1.3;
    // Factor to reduce the red channel in blue areas, increasing blue purity.
    const bluePurityR = 0.8;
    // Factor to reduce the green channel in blue areas, increasing blue purity.
    const bluePurityG = 0.9;
    // Minimum blue value threshold for a pixel to be considered for strong blue enhancement.
    // This helps target significant blues and avoids over-processing very dark or faint blues.
    const blueDetectionThreshold = 50;

    // For Gold/Warming Effect (applied to non-blue dominant areas):
    // Factor to boost the red channel, creating a golden/warm hue.
    const goldIntensityR = 1.3;
    // Factor to boost the green channel. Kept slightly lower than red's boost
    // to achieve a warmer gold rather than a pure yellow or greenish-yellow.
    const goldIntensityG = 1.1;
    // Factor to reduce the blue channel, enhancing the warmth of the color.
    const goldPurityB = 0.7;

    // Iterate over each pixel (each pixel consists of 4 values: R, G, B, A)
    for (let i = 0; i < data.length; i += 4) {
        let r = data[i];     // Red channel
        let g = data[i+1];   // Green channel
        let b = data[i+2];   // Blue channel
        // Alpha channel (data[i+3]) is preserved.

        let outR, outG, outB;

        // Determine if the pixel is predominantly blue.
        // A pixel is considered "blue dominant" if its blue channel value is greater
        // than both red and green, AND its blue value is above a certain threshold.
        if (b > r && b > g && b > blueDetectionThreshold) {
            // Apply Blue Enhancement
            outB = b * blueIntensity;
            outR = r * bluePurityR;
            outG = g * bluePurityG;
        } else {
            // Apply Gold/Warming Effect to non-blue dominant areas
            // This affects greens, yellows, reds, browns, grays, etc.
            outR = r * goldIntensityR;
            outG = g * goldIntensityG;
            outB = b * goldPurityB;
        }

        // Clamp the resulting R, G, B values to the valid 0-255 range and round them.
        data[i] = Math.max(0, Math.min(255, Math.round(outR)));
        data[i+1] = Math.max(0, Math.min(255, Math.round(outG)));
        data[i+2] = Math.max(0, Math.min(255, Math.round(outB)));
    }

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

    // Return the canvas element
    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 Singh-Ray Gold-N-Blue Polarizer Effect Tool allows users to enhance their images by applying a polarizing filter effect that emphasizes blue tones in predominantly blue areas while warming up other colors to golden hues. This tool is ideal for photographers and hobbyists looking to improve landscape photos, particularly those featuring water or sky, by enhancing the blues and adding warmth to other elements in the scene. The tool processes images in real-time and can help achieve a more vibrant and artistically pleasing appearance.

Leave a Reply

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

Other Image Tools:

Image Black and White Blue Filter Effect Tool

Image Pinhole Solargraphy Effect Creator

Image Kodak Vision3 500T Motion Picture Film Effect Simulator

Image Soft Focus Filter Effect for Nikon Nikkor

Image Bergger Pancro 400 Film Filter Effect Tool

Image Agfa Optima Filter Effect Application

Image Technicolor 3-Strip Process Filter Effect

Image Cyanotype Process Filter Effect

Image Black and White with Orange #21 Filter Effect Tool

Image Bleach Bypass Effect Filter

Image IMAX Camera Filter Effect Tool

Image Super 8 Film Filter Effect Tool

Image Anamorphic Lens Flare Filter Effect Tool

Image Prism Photography Filter Effect Tool

Image Freelensing Effect Creator

Image Tiffen Glimmerglass Filter Effect Tool

Image Mamiya RZ67 Medium Format Filter Effect Tool

Image Wet Plate Collodion Filter Effect Tool

Image Ilford Pan F Plus 50 Filter Effect Tool

Image X-ray Photography Filter Effect Tool

Image Radial Graduated Filter Effect Tool

Image Lee 80A Cooling Filter Effect Application

Image Autochrome Lumière Filter Effect Tool

Photo Infrared 720nm Filter Effect Tool

Image 10-Stop ND Filter Effect Tool

Photo Full Spectrum Filter Effect Tool

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

See All →