Please bookmark this page to avoid losing your image tool!

Photo Black And White Yellow 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');
    const ctx = canvas.getContext('2d');

    // Ensure the image is loaded and has valid dimensions.
    // originalImg is expected to be an HTMLImageElement that has finished loading.
    const width = originalImg.naturalWidth;
    const height = originalImg.naturalHeight;

    if (width === 0 || height === 0) {
        // This can happen if the image isn't loaded yet or is invalid.
        console.error("Image has not loaded or has zero dimensions. Cannot process.");
        // Return an empty or minimal canvas to avoid further errors downstream.
        canvas.width = 0;
        canvas.height = 0;
        return canvas;
    }

    canvas.width = width;
    canvas.height = height;

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

    // Get the pixel data from the canvas
    const imageData = ctx.getImageData(0, 0, width, height);
    const pixels = imageData.data; // This is a Uint8ClampedArray

    // Coefficients for simulating a B+W Yellow #8 filter effect.
    // These weights are chosen to mimic how a yellow filter affects light:
    // - It passes red and green light well.
    // - It absorbs (reduces) blue light.
    // This typically results in darker skies and lighter reds/yellows/greens in the B&W image.
    // The sum of coefficients (0.35 + 0.60 + 0.05) is 1.0, which helps maintain overall brightness.
    const rCoeff = 0.35;
    const gCoeff = 0.60;
    const bCoeff = 0.05;

    for (let i = 0; i < pixels.length; i += 4) {
        const r = pixels[i];     // Red value
        const g = pixels[i + 1]; // Green value
        const b = pixels[i + 2]; // Blue value
        // pixels[i + 3] is the alpha channel, which we'll leave unchanged.

        // Calculate the grayscale value using the yellow filter coefficients.
        // Math.round is used to get an integer result for pixel channel values.
        const gray = Math.round(rCoeff * r + gCoeff * g + bCoeff * b);
        
        // Update the pixel data with the new grayscale values.
        // The Uint8ClampedArray 'pixels' will automatically clamp 'gray' to the 0-255 range.
        pixels[i] = gray;     // Set Red channel to gray
        pixels[i + 1] = gray; // Set Green channel to gray
        pixels[i + 2] = gray; // Set Blue channel to gray
    }

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

    // Return the canvas with the B+W yellow filter effect applied
    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 Black and White Yellow Filter Effect Tool allows users to transform their images into black and white versions enhanced with a yellow filter effect. This filter emphasizes reds, greens, and other warm colors while reducing the impact of blue tones, resulting in a distinct aesthetic. Real-world use cases for this tool include creating artistic monochrome images, enhancing photographs for print where color dynamics matter, or simply experimenting with different visual styles for personal or professional projects.

Leave a Reply

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

Other Image Tools:

Image Contax G2 Film Camera Render Effect Applicator

Image 110 Film Format Filter Effect Tool

Photo Jupiter-9 Portrait Lens Filter Effect

Image Fujifilm GW690 Texas Leica Filter Effect Application

Image Zeiss T* Coating Filter Effect Tool

Image Hoya R72 Infrared Filter Effect Tool

Image Filter Effect for Zeiss Ikon Contaflex

Photo Olympus Mju-II/Stylus Epic Filter Effect Tool

Image NiSi Nano IR ND Filter Effect Tool

Image Polaroid SX-70 Filter Effect Tool

Image Linhof Technika Filter Effect Tool

Image Lee Big Stopper 10-Stop ND Filter Effect Tool

Image Minolta X-700 Film Camera Render Effect Creator

Image ORWO UN54 Motion Picture Film Effect Applicator

Image Shen-Hao Large Format Filter Effect Tool

Image Impossible Project Polaroid Filter Effect Tool

Photo Foma Retropan 320 Film Filter Effect Tool

Image Fuji QuickSnap Disposable Filter Effect Application

Image 220 Film Format Filter Effect

Image Black and White with Green #61 Filter Effect Tool

Image 35mm Panoramic Camera Filter Effect Tool

Image Hitech Firecrest ND Filter Effect Formatter

Photo Rodenstock Digital Vario ND Filter Effect Tool

Image Leica Yellow Filter Effect Application

Image Argus C3 Vintage Camera Filter Effect

Image ORWO NP22 Film Filter Effect Application

Image Wratten #25 Red Filter Effect Tool

Image Helios 44-2 Swirly Bokeh Effect Filter

Image Fujifilm ETERNA Motion Picture Film Effect Applicator

Image Fujifilm FP-100C Instant Film Effect Filter

Image Canon AE-1 Film Camera Render Effect

Photo B+W Dark Red #29 Filter Effect Application

Image Toy Camera Effect Enhancer

Photo Graflex Speed Graphic Filter Effect Tool

Image Konica Hexar AF Filter Effect Application

Image Ricoh GR Film Camera Filter Effect Application

See All →