Please bookmark this page to avoid losing your image tool!

Image Pentax 67 Medium Format 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,
    saturationFactor = 0.8,   // Range: 0.0 (grayscale) to 2.0 (super vibrant). 1.0 is original. Default: 0.8 (slightly desaturated)
    contrastFactor = 1.2,     // Range: 0.0 to 3.0. 1.0 is original. Default: 1.2 (increased contrast)
    warmthFactor = 0.05,      // Range: -0.3 (cool) to 0.3 (warm). 0.0 is no change. Default: 0.05 (slight warmth)
    vignetteStrength = 0.5,   // Range: 0.0 (none) to 1.0 (strong). Opacity of vignette at edges. Default: 0.5
    grainStrength = 15,       // Range: 0 (none) to 50 (heavy). Intensity of film grain. Default: 15 (subtle grain)
    fadeAmount = 5            // Range: 0 (none) to 50 (very faded). Lifts black levels. Default: 5 (slight fade)
) {
    const canvas = document.createElement('canvas');
    // Using { willReadFrequently: true } can sometimes optimize frequent getImageData/putImageData calls
    const ctx = canvas.getContext('2d', { willReadFrequently: true });

    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 image data for pixel manipulation
    const imageData = ctx.getImageData(0, 0, imgWidth, imgHeight);
    const data = imageData.data;
    const length = data.length;

    const contrastMidPoint = 128; // Mid-point for contrast adjustment

    // Process each pixel
    for (let i = 0; i < length; i += 4) {
        let r = data[i];
        let g = data[i + 1];
        let b = data[i + 2];

        // 1. Saturation adjustment
        if (saturationFactor !== 1.0) {
            const gray = 0.299 * r + 0.587 * g + 0.114 * b; // Calculate luminance
            r = gray + (r - gray) * saturationFactor;
            g = gray + (g - gray) * saturationFactor;
            b = gray + (b - gray) * saturationFactor;
        }

        // 2. Warmth/Cooling adjustment
        if (warmthFactor !== 0) {
            // Positive warmthFactor makes it warmer, negative makes it cooler
            r = r * (1 + warmthFactor);
            g = g * (1 + warmthFactor * 0.5); // Green is affected less for a balanced tint
            b = b * (1 - warmthFactor);
        }
        
        // 3. Contrast adjustment
        if (contrastFactor !== 1.0) {
            r = contrastMidPoint + (r - contrastMidPoint) * contrastFactor;
            g = contrastMidPoint + (g - contrastMidPoint) * contrastFactor;
            b = contrastMidPoint + (b - contrastMidPoint) * contrastFactor;
        }

        // 4. Fade (Lift Blacks) adjustment
        if (fadeAmount > 0) {
            r += fadeAmount;
            g += fadeAmount;
            b += fadeAmount;
        }
        
        // 5. Film Grain adjustment
        if (grainStrength > 0) {
            // Add monochrome noise
            const noise = (Math.random() - 0.5) * grainStrength;
            r += noise;
            g += noise;
            b += noise;
        }

        // Clamp values to the valid [0, 255] range
        data[i] = Math.max(0, Math.min(255, r));
        data[i + 1] = Math.max(0, Math.min(255, g));
        data[i + 2] = Math.max(0, Math.min(255, b));
        // Alpha channel (data[i+3]) is preserved
    }

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

    // 6. Vignette effect
    if (vignetteStrength > 0) {
        const centerX = imgWidth / 2;
        const centerY = imgHeight / 2;
        // Outer radius to cover image corners
        const outerRadius = Math.hypot(centerX, centerY); 
        // Inner radius ratio defines the size of the clear central area
        const innerRadiusRatio = 0.25; 

        const gradient = ctx.createRadialGradient(
            centerX, centerY, outerRadius * innerRadiusRatio,
            centerX, centerY, outerRadius
        );

        // Vignette darkens edges, so use black with varying alpha
        gradient.addColorStop(0, 'rgba(0,0,0,0)'); // Transparent center
        // Add a mid-stop for smoother falloff
        gradient.addColorStop(0.6, `rgba(0,0,0,${vignetteStrength * 0.35})`); 
        gradient.addColorStop(1, `rgba(0,0,0,${vignetteStrength})`); // Darker edge

        ctx.fillStyle = gradient;
        // Default 'source-over' compositing draws the semi-transparent black on top
        ctx.fillRect(0, 0, imgWidth, imgHeight);
    }

    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 Pentax 67 Medium Format Filter Effect Tool allows users to enhance their images by applying various filter effects reminiscent of medium format film photography. This tool provides adjustments for saturation, contrast, warmth, vignette strength, grain, and fade effects, enabling users to achieve a vintage or film-like aesthetic. It is ideal for photographers, graphic designers, and hobbyists looking to give their digital images a classic touch, making it suitable for personal projects, social media content, or professional presentations.

Leave a Reply

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

Other Image Tools:

Image ARRI Alexa Cinema Camera Filter Effect Enhancer

Image Cinestill 50D Filter Effect Application

Image Kodachrome 64 Filter Effect Tool

Photo Lomography Berlin Kino Filter Effect Tool

Image Fujifilm Neopan Filter Effect Tool

Image Polaroid Instant Film Filter Effect Tool

Image Holga Camera Filter Effect Tool

Image Fisheye Lens Distortion Filter Effect Tool

Image Kodak Gold 200 Film Filter Effect Tool

Photo Macro Filter Effect Tool

Image Neutral Density Filter Effect Tool

Image Green Filter Black And White Effect Tool

Image Large Format Film Filter Effect Creator

Image Pinhole Camera Filter Effect Tool

Image Warming Filter Effect Tool

Image Fujifilm Pro 400H Filter Effect Application

Image Diffusion Filter Effect Tool

Image Push-Processed Film Filter Effect Tool

Image Color Temperature Orange Filter Effect Tool

Image Kodak Ektar 100 Film Filter Effect

Image Yellow Filter Black And White Effect Tool

Image Expired Film Filter Effect Tool

Image Circular Polarizer Filter Effect Tool

Image Lomography Purple Filter Effect Tool

Image Split Field Filter Effect Tool

Image Soft Focus Filter Effect Tool

Image Medium Format Film Filter Effect

Image Wide-Angle Lens Perspective Filter Effect Tool

Olympus OM-1 Photo Filter Effect Tool

Image Fujifilm Velvia Filter Effect Tool

Image Lensbaby Selective Focus Filter Effect Tool

Image Color Temperature Blue Filter Effect Tool

Image UV Filter Effect Tool

Image Red Filter Black And White Effect Tool

Image Redscale Film Filter Effect

Image Cinestill 800T Filter Effect Tool

See All →