Please bookmark this page to avoid losing your image tool!

Image AGFA APX 25 Film 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, contrast = 1.5, grain = 6) {
    const canvas = document.createElement('canvas');
    // Using { willReadFrequently: true } can be a hint for optimization for repeated getImageData/putImageData calls.
    const ctx = canvas.getContext('2d', { willReadFrequently: true });

    // Ensure parameters are numbers, in case string representations are passed
    const numContrast = Number(contrast);
    const numGrain = Number(grain);

    // Set canvas dimensions to the original image's dimensions
    canvas.width = originalImg.naturalWidth;
    canvas.height = originalImg.naturalHeight;

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

    // If canvas dimensions are zero (e.g., image not loaded properly), return empty canvas.
    if (canvas.width === 0 || canvas.height === 0) {
        return canvas;
    }

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

    // Iterate over each pixel (RGBA components)
    for (let i = 0; i < data.length; i += 4) {
        const r = data[i];
        const g = data[i + 1];
        const b = data[i + 2];
        // Alpha (data[i+3]) is preserved

        // 1. Convert to grayscale using the luminosity method (perceptual)
        // Standard weights: 0.299 R, 0.587 G, 0.114 B
        let gray = 0.299 * r + 0.587 * g + 0.114 * b;

        // 2. Apply contrast adjustment
        // Formula: newValue = (oldValue - midpoint) * contrastFactor + midpoint
        // Midpoint for a 0-255 range is 127.5.
        gray = (gray - 127.5) * numContrast + 127.5;
        
        // Clamp the gray value to ensure it remains within the 0-255 range
        // This is crucial as the contrast adjustment can push values outside this range.
        gray = Math.max(0, Math.min(255, gray));

        // 3. Simulate film grain
        // Add a small amount of random noise.
        // Math.random() produces [0, 1). (Math.random() - 0.5) produces [-0.5, 0.5).
        // So, noise will be in the range [-numGrain/2, numGrain/2).
        const noise = (Math.random() - 0.5) * numGrain;
        let finalValue = gray + noise;

        // The Uint8ClampedArray (data) will automatically clamp the finalValue
        // to the 0-255 range upon assignment. For example:
        // data[i] = -10 will result in data[i] being 0.
        // data[i] = 300 will result in data[i] being 255.
        // data[i] = 123.7 will result in data[i] being 124.
        
        data[i] = finalValue;     // Red channel
        data[i + 1] = finalValue; // Green channel
        data[i + 2] = finalValue; // Blue channel
    }

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

    // Return the canvas element with the applied effect
    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 AGFA APX 25 Film Filter Effect Tool allows users to apply a vintage film effect to their images, inspired by the characteristics of AGFA APX 25 film. This tool enhances images by converting them to grayscale, adjusting the contrast for a more dramatic look, and introducing a simulated film grain effect for added texture. It is suitable for photographers and graphic designers looking to achieve a classic film-style aesthetic in their digital images, or for anyone wanting to create nostalgic and artistic visuals.

Leave a Reply

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

Other Image Tools:

Image Singh-Ray Gold-N-Blue Polarizer Effect Tool

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

See All →