Untitled

Anonymous
Plain Text
09/12/2025 9:40 AM
1.1 KB
13
Indexable
Never
from PIL import Image, ImageEnhance, ImageFilter
import numpy as np

# Load the image
image_path = "1000001807.jpg"  # Make sure the image is in the same folder
original = Image.open(image_path).convert("RGB")

# Resize to simulate old iPhone resolution
image = original.resize((640, 960))

# Add eerie green-blue tint
r, g, b = image.split()
g = g.point(lambda i: i * 1.1)
b = b.point(lambda i: i * 1.2)
tinted = Image.merge("RGB", (r, g, b))

# Create vignette
width, height = tinted.size
x = np.linspace(-1, 1, width)
y = np.linspace(-1, 1, height)
xv, yv = np.meshgrid(x, y)
d = np.sqrt(xv**2 + yv**2)
vignette = 1 - np.clip(d, 0, 1)
vignette = vignette**2.5
vignette_img = np.array(tinted).astype(np.float32)
for i in range(3):
    vignette_img[..., i] *= vignette
    vignette_img = np.clip(vignette_img, 0, 255).astype(np.uint8)
    vignetted = Image.fromarray(vignette_img)

    # Add slight blur
    blurred = vignetted.filter(ImageFilter.GaussianBlur(radius=1))

    # Save final image with low quality to simulate old JPEG compression
    blurred.save("eery_old_iphone.jpg", format="JPEG", quality=40)
    print("✅ Saved as 'eery_old_iphone.jpg'")
    
Editor is loading...
Leave a Comment