Team-Porträts mit feiner Körnung (Variante A)

Porträts (groß und Thumbnails) sowie das Hero-Detail im Menü bekommen die
feine Körnung wie der Hero; die Galerie bleibt bei Variante B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBHsCnWNXAB2Le3gAEsivF
This commit is contained in:
Claude committed 2026-09-29 15:10:42 +00:00
1 parent 734c2775b5
commit d80e072adc
15 files changed
+12 -5

No files matched your search

+2 -2
View File
@@ -57,8 +57,8 @@ Preis-Thumbnails). Neue Porträts im selben Format ablegen und in `src/data/salo
laufen beim Scrollen seitlich durch, auf dem Handy wird gewischt. Neues Bild: als WebP (900 px breit) in laufen beim Scrollen seitlich durch, auf dem Handy wird gewischt. Neues Bild: als WebP (900 px breit) in
`src/assets/gallery/` ablegen und in `moments` in `Gallery.tsx` eintragen (Titel + Seitenverhältnis). `src/assets/gallery/` ablegen und in `moments` in `Gallery.tsx` eintragen (Titel + Seitenverhältnis).
**Körnung:** Alle Fotos haben einen Filmkorn-Look – Hero fein (Variante A), alle übrigen Fotos wie Film **Körnung:** Alle Fotos haben einen Filmkorn-Look – Hero und Team-Porträts fein (Variante A), Galerie und
ISO 800 (Variante B). Die unbearbeiteten Originale liegen in `design/original/`. Neue oder geänderte Fotos Salon-Foto im Menü wie Film ISO 800 (Variante B). Die unbearbeiteten Originale liegen in `design/original/`. Neue oder geänderte Fotos
dort ablegen (gleicher Pfad wie in `src/assets/`) und `python3 scripts/grain.py` ausführen – das Skript dort ablegen (gleicher Pfad wie in `src/assets/`) und `python3 scripts/grain.py` ausführen – das Skript
schreibt die gekörnten Versionen nach `src/assets/`. schreibt die gekörnten Versionen nach `src/assets/`.
+10 -3
View File
@@ -1,7 +1,8 @@
"""Filmkorn auf die Website-Fotos rechnen. """Filmkorn auf die Website-Fotos rechnen.
Liest die unbearbeiteten Bilder aus design/original/ und schreibt die gekörnten Versionen Liest die unbearbeiteten Bilder aus design/original/ und schreibt die gekörnten Versionen
nach src/assets/. Hero: Variante A (fein), alle anderen Fotos: Variante B (Film, ISO 800). nach src/assets/. Hero und Team-Porträts: Variante A (fein), alle anderen Fotos (Galerie,
Salon-Foto im Menü): Variante B (Film, ISO 800).
pip install numpy pillow pip install numpy pillow
python3 scripts/grain.py python3 scripts/grain.py
@@ -22,7 +23,13 @@ VARIANTS = {
'B': dict(amount=0.028, size=1.5, color=0.15, lift=0.03, contrast=1.05, sat=0.92), 'B': dict(amount=0.028, size=1.5, color=0.15, lift=0.03, contrast=1.05, sat=0.92),
} }
HERO = {'photos/hero.webp', 'photos/hero-1000.webp', 'photos/hero-mobile.webp'} FINE = {'photos/hero.webp', 'photos/hero-1000.webp', 'photos/hero-mobile.webp', 'photos/hero-detail.webp'}
def variant_for(rel):
return 'A' if rel in FINE or rel.startswith('team/') else 'B'
LUMA = np.array([0.2126, 0.7152, 0.0722], np.float32) LUMA = np.array([0.2126, 0.7152, 0.0722], np.float32)
@@ -59,7 +66,7 @@ def grain(img, rng, amount, size, color=0.0, lift=0.0, contrast=1.0, sat=1.0):
def main(): def main():
for i, src in enumerate(sorted(SRC.rglob('*.webp'))): for i, src in enumerate(sorted(SRC.rglob('*.webp'))):
rel = src.relative_to(SRC).as_posix() rel = src.relative_to(SRC).as_posix()
variant = 'A' if rel in HERO else 'B' variant = variant_for(rel)
out = grain(Image.open(src), np.random.default_rng(i + 1), **VARIANTS[variant]) out = grain(Image.open(src), np.random.default_rng(i + 1), **VARIANTS[variant])
dst = DST / rel dst = DST / rel
out.save(dst, 'WEBP', quality=82, method=6) out.save(dst, 'WEBP', quality=82, method=6)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 96 KiB