Please bookmark this page to avoid losing your image tool!

Image To Realistic IPhone Style JPEG Converter With Custom Metadata

(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.
async function processImage(
    originalImg,
    make = "Apple",
    model = "iPhone 17",
    dateTime = "2026:07:07 21:15:00",
    latitude = -43.5320,
    longitude = 172.6362,
    quality = 0.92
) {
    // 1. Dynamically load piexifjs for Exif metadata injection
    await new Promise((resolve, reject) => {
        if (window.piexif) {
            resolve();
            return;
        }
        const script = document.createElement('script');
        script.src = 'https://cdnjs.cloudflare.com/ajax/libs/piexifjs/1.0.6/piexif.js';
        script.onload = resolve;
        script.onerror = () => reject(new Error('Failed to load piexifjs'));
        document.head.appendChild(script);
    });

    // 2. Create canvas and draw the image with an "iPhone Style" filter
    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    const ctx = canvas.getContext('2d');

    // Mimic the modern iPhone processing (Smart HDR look): slight contrast, saturation boost, and very slight warmth
    ctx.filter = "contrast(1.08) saturate(1.15) brightness(1.02) sepia(0.04)";
    ctx.drawImage(originalImg, 0, 0);
    ctx.filter = "none";

    // 3. Convert to JPEG base64
    const jpegDataUrl = canvas.toDataURL('image/jpeg', Number(quality));

    // 4. Construct EXIF Metadata
    // Helper function to convert decimal degrees to GPS rational format Arrays expected by Exif
    function getDmsRational(deg) {
        const absolute = Math.abs(deg);
        const degrees = Math.floor(absolute);
        const minutesNotTruncated = (absolute - degrees) * 60;
        const minutes = Math.floor(minutesNotTruncated);
        const seconds = Math.round((minutesNotTruncated - minutes) * 60 * 100);
        return [[degrees, 1], [minutes, 1], [seconds, 100]];
    }

    const lat = Number(latitude);
    const lng = Number(longitude);
    const latRef = lat < 0 ? "S" : "N";
    const lngRef = lng < 0 ? "W" : "E";

    // Build Exif standard structure
    const exifObj = {
        "0th": {
            [piexif.ImageIFD.Make]: make,
            [piexif.ImageIFD.Model]: model,
            [piexif.ImageIFD.Software]: "iOS 19.4.1", // Future iOS version guess for 2026
            [piexif.ImageIFD.DateTime]: dateTime
        },
        "Exif": {
            [piexif.ExifIFD.DateTimeOriginal]: dateTime,
            [piexif.ExifIFD.DateTimeDigitized]: dateTime,
            [piexif.ExifIFD.ColorSpace]: 1, // sRGB
            [piexif.ExifIFD.PixelXDimension]: canvas.width,
            [piexif.ExifIFD.PixelYDimension]: canvas.height,
            [piexif.ExifIFD.LensMake]: make,
            [piexif.ExifIFD.LensModel]: `${model} back main camera 24mm f/1.78`
        },
        "GPS": {
            [piexif.GPSIFD.GPSLatitudeRef]: latRef,
            [piexif.GPSIFD.GPSLatitude]: getDmsRational(lat),
            [piexif.GPSIFD.GPSLongitudeRef]: lngRef,
            [piexif.GPSIFD.GPSLongitude]: getDmsRational(lng)
        }
    };

    // 5. Inject EXIF into the JPEG Data URL
    const exifBytes = piexif.dump(exifObj);
    const finalJpegDataUrl = piexif.insert(exifBytes, jpegDataUrl);

    // 6. Return as a new Image element for display or download
    return new Promise((resolve) => {
        const finalImg = new Image();
        finalImg.onload = () => resolve(finalImg);
        finalImg.src = finalJpegDataUrl;
    });
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

This tool allows users to transform their images by applying visual filters that mimic the aesthetic of modern smartphone photography, specifically focusing on a high-dynamic-range look with adjusted contrast and saturation. Additionally, it enables the injection of custom EXIF metadata, allowing you to specify details such as the camera make and model, date and time of capture, and GPS coordinates. This can be useful for photographers looking to test metadata configurations, creators needing to simulate specific device aesthetics, or for managing digital asset properties.

Leave a Reply

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