Please bookmark this page to avoid losing your image tool!

Image Lomo LC-A 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.4, saturation = 1.2, vignetteStrength = 0.6, vignetteFalloff = 2.0, redBoost = 1.1, greenBoost = 1.0, blueBoost = 1.1) {
    const canvas = document.createElement('canvas');
    // Using { willReadFrequently: true } can be a performance hint for some browsers.
    const ctx = canvas.getContext('2d', { willReadFrequently: true });

    const width = originalImg.naturalWidth || originalImg.width;
    const height = originalImg.naturalHeight || originalImg.height;

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

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

    // Handle cases where the image might be 0x0, returning the empty canvas.
    if (width === 0 || height === 0) {
        return canvas;
    }
    
    const imageData = ctx.getImageData(0, 0, width, height);
    const data = imageData.data; // data is a Uint8ClampedArray

    const centerX = width / 2;
    const centerY = height / 2;
    // Calculate the maximum distance from the center to a corner.
    // This is used to normalize the distance for vignette calculation.
    const maxDist = Math.sqrt(centerX * centerX + centerY * centerY);

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

        // 1. Color Boost
        // Apply channel-specific boosts.
        r *= redBoost;
        g *= greenBoost;
        b *= blueBoost;
        // Clamp values to the [0, 255] range after boosting.
        r = Math.max(0, Math.min(255, r));
        g = Math.max(0, Math.min(255, g));
        b = Math.max(0, Math.min(255, b));

        // 2. Contrast
        // Adjust contrast: f(v) = factor * (v - 128) + 128
        // This formula increases the difference from the mid-gray value (128).
        r = contrast * (r - 128) + 128;
        g = contrast * (g - 128) + 128;
        b = contrast * (b - 128) + 128;
        // Clamp values after contrast adjustment.
        r = Math.max(0, Math.min(255, r));
        g = Math.max(0, Math.min(255, g));
        b = Math.max(0, Math.min(255, b));
        
        // 3. Saturation
        // Calculate luminance using standard Rec.601 coefficients.
        const lum = 0.299 * r + 0.587 * g + 0.114 * b;
        // Adjust saturation: f(v) = lum + S * (v - lum)
        // This formula moves color components away from (S > 1) or towards (S < 1) luminance.
        r = lum + saturation * (r - lum);
        g = lum + saturation * (g - lum);
        b = lum + saturation * (b - lum);
        // Clamp values after saturation adjustment.
        r = Math.max(0, Math.min(255, r));
        g = Math.max(0, Math.min(255, g));
        b = Math.max(0, Math.min(255, b));

        // 4. Vignetting
        // Calculate current pixel's coordinates.
        const currentPixelX = (i / 4) % width;
        const currentPixelY = Math.floor((i / 4) / width);
        
        // Calculate distance of the current pixel from the center.
        const dx = currentPixelX - centerX;
        const dy = currentPixelY - centerY;
        const dist = Math.sqrt(dx * dx + dy * dy);
        
        let vignetteEffect = 0;
        // Avoid division by zero if maxDist is 0 (only for invalid image dimensions like 0x0).
        if (maxDist > 0) {
            // Normalized distance from center (0 to 1), powered by vignetteFalloff for curve.
            vignetteEffect = Math.pow(dist / maxDist, vignetteFalloff);
        }
        
        // Calculate brightness multiplier (1 at center, decreases towards edges).
        // vignetteStrength controls how dark the edges become.
        const brightnessMultiplier = 1.0 - (vignetteStrength * vignetteEffect);
        
        // Apply vignette. If brightnessMultiplier is negative (high vignetteStrength),
        // r, g, b can become negative here.
        r *= brightnessMultiplier;
        g *= brightnessMultiplier;
        b *= brightnessMultiplier;

        // Final assignment to the ImageData array.
        // Values are rounded to the nearest integer and clamped to [0, 255].
        // Uint8ClampedArray would do this automatically, but explicit handling is clearer
        // and robust if `data` were a different array type.
        data[i]     = Math.max(0, Math.min(255, Math.round(r)));
        data[i + 1] = Math.max(0, Math.min(255, Math.round(g)));
        data[i + 2] = Math.max(0, Math.min(255, Math.round(b)));
        // Alpha channel (data[i + 3]) remains unchanged.
    }

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

    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 Lomo LC-A Filter Effect Tool allows users to transform their images by applying a distinct lomo-style filter. This tool enhances the image’s contrast and saturation, adds a vignette effect, and adjusts the color balance for red, green, and blue channels. The result is an artistic, vintage-style photograph that is characterized by vibrant colors and darkened edges. This can be particularly useful for photographers and social media enthusiasts looking to create striking visuals, enhance their personal photos, or give a unique flair to images intended for sharing online.

Leave a Reply

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

Other Image Tools:

Image Large Format Filter Effect Application

Image Zone Plate Lens Effect Creator

Photo Kodak Retina Filter Effect Tool

Image Polaroid 600 Filter Effect Tool

Photo Black and White Yellow Filter Effect Tool

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

See All →