store: Play Console copy-paste sheet and 16:9 screenshots
- store/play-console.md holds everything that has to be typed into the Console: DE/EN name, short and full description, release notes (lengths verified), graphics checklist with real dimensions, the app-content answers, the full Data Safety table, the IARC questionnaire and the upload order. - the Data Safety answers are derived from the build, not from memory: aapt2 shows INTERNET, ACCESS_NETWORK_STATE, BILLING, AD_ID + AdServices, WAKE_LOCK and FOREGROUND_SERVICE; grepping the Dart code shows the only network target is the local 127.0.0.1 referee, so nothing leaves the device except traffic to Google. That is why device/other IDs are declared as collected+shared for ads and approximate location as shared only, with a note to add the collected/app-functionality row once the referee is live. - screenshots were 1080x2400 (2.22:1) and Play rejects anything above 2:1, so tools/art/gen_screens.py frames the raw captures onto a 1080x1920 brand canvas; raw shots stay in store/screenshots/raw for future re-framing. - flagged: screenshot 04 shows the honest "no products created" state and needs a re-shoot once remove_ads exists in the Console.
@@ -1,5 +1,10 @@
|
||||
# Store-Listing (Entwurf)
|
||||
|
||||
> **Copy-Paste-Blatt: [play-console.md](play-console.md).** Dort stehen alle Texte in
|
||||
> DE/EN mit geprueften Zeichenlaengen sowie die Antworten fuer Data Safety, IARC und
|
||||
> die App-Inhalte. Diese Datei ist die Arbeitsfassung, play-console.md ist die Vorlage
|
||||
> zum Abtippen.
|
||||
|
||||
| Feld | Wert |
|
||||
|---|---|
|
||||
| Paket | `de.softwareapp_hb.ironarc` |
|
||||
@@ -68,7 +73,7 @@ from Baby Shell to Digger. Drag, aim, release - and watch the hill under your op
|
||||
|---|---|---|
|
||||
| Icon 512×512 | ✅ generiert (`tools/art/artgen.py`) | `store/assets/icon_512.png` |
|
||||
| Feature-Graphic 1024×500 | ✅ generiert (`tools/art/artgen.py`) | `store/assets/feature_1024x500.png` |
|
||||
| Screenshots (min. 4) | ✅ echte Geräteaufnahmen | `store/screenshots/01..04` (1080×2400) |
|
||||
| Screenshots (min. 4) | ✅ echte Geräteaufnahmen, 16:9 gerahmt | `store/screenshots/01..04` (1080×1920), Rohbilder in `raw/` |
|
||||
| Datenschutz-URL (Play-Feld) | ✅ gesetzt | https://gitea.softwareapp-hb.de/fishfacegit/iron-arc/raw/branch/main/store/privacy-policy.html |
|
||||
| Promo-Video 30 s | ❌ offen (Aufnahme auf Gerät nötig) | – |
|
||||
| Tablet-Screenshots (7", 10") | ❌ offen | – |
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
# Play Console — Copy-Paste-Blatt
|
||||
|
||||
Stand: 2026-10-25, Build **0.9.0 (13)**. Alle Angaben sind gegen den Release-Build geprüft
|
||||
(Berechtigungen per `aapt2 dump permissions`, Netzwerkziele per Code-Grep, Asset-Größen per
|
||||
`PIL`). Wenn sich der Build ändert, muss dieses Blatt mitwandern.
|
||||
|
||||
---
|
||||
|
||||
## 1. App anlegen
|
||||
|
||||
| Feld | Wert |
|
||||
|---|---|
|
||||
| App-Name (Play) | `Iron Arc` |
|
||||
| Paketname | `de.softwareapp_hb.ironarc` (nicht änderbar) |
|
||||
| Standardsprache | Deutsch (de-DE) |
|
||||
| App oder Spiel | **Spiel** |
|
||||
| Kostenlos oder kostenpflichtig | **Kostenlos** |
|
||||
| Kategorie | Spiele → **Strategie** |
|
||||
| Tags | Rundenbasiert, Artillerie, Lokaler Mehrspieler, Offline |
|
||||
| Kontakt-E-Mail | `softwareapp.hb@gmail.com` |
|
||||
| Website | `https://softwareapp-hb.de` |
|
||||
| Datenschutz-URL | `https://gitea.softwareapp-hb.de/fishfacegit/iron-arc/raw/branch/main/store/privacy-policy.html` |
|
||||
|
||||
---
|
||||
|
||||
## 2. Store-Eintrag — Deutsch
|
||||
|
||||
### App-Name (max. 30 Zeichen)
|
||||
|
||||
```
|
||||
Iron Arc: Panzerduell
|
||||
```
|
||||
|
||||
### Kurzbeschreibung (max. 80 Zeichen)
|
||||
|
||||
```
|
||||
Rundenbasiertes Panzerduell mit zerstörbarer Landschaft. Sieg in 3 Minuten.
|
||||
```
|
||||
|
||||
### Vollständige Beschreibung (max. 4000 Zeichen)
|
||||
|
||||
```
|
||||
Ein Schuss. Ein Krater. Kein Zufall.
|
||||
|
||||
IRON ARC ist ein rundenbasiertes Artillerie-Duell für zwei Spieler an einem Gerät.
|
||||
Du zielst mit einer Wischgeste, dosierst die Kraft und überlässt den Rest der Physik –
|
||||
Steigung, Wind und deiner Einschätzung, wo der Boden nachgibt.
|
||||
|
||||
WAS DAS SPIEL ANDERS MACHT
|
||||
• Determinismus statt Glück: Jeder Schuss ist reproduzierbar. Dieselben Eingaben
|
||||
ergeben immer dasselbe Ergebnis – auf jedem Gerät.
|
||||
• Zerstörbare Landschaft: Jeder Treffer reißt einen Krater. Nach drei Runden sieht
|
||||
keine Karte mehr aus wie am Anfang.
|
||||
• Wind, Steigung, Munition: Drei Variablen, die du lesen musst, statt auf einen
|
||||
Glückswurf zu warten.
|
||||
• Kein Grind, kein Timer: Du startest und spielst. Keine Energie, keine Wartezeiten.
|
||||
|
||||
SO SPIELST DU
|
||||
1. Ziehen: Richtung und Kraft einstellen – die Punktlinie zeigt den erwarteten Bogen.
|
||||
2. Loslassen: Der Schuss fliegt, gräbt sich ein, verändert das Gelände.
|
||||
3. Antworten: Der Gegner ist dran. Wechselt euch ab, bis einer keine Panzerung mehr hat.
|
||||
Eine Partie dauert selten länger als drei Minuten – ideal für die Mittagspause.
|
||||
|
||||
FAIR BLEIBT FAIR
|
||||
• Keine Pay-to-win-Käufe. Wer kauft, kauft Bequemlichkeit oder Kosmetik, keinen Vorteil.
|
||||
• „Werbung entfernen“ ist ein einmaliger Kauf; Belohnungswerbung bleibt immer freiwillig.
|
||||
• Offline spielbar. Online-Sync ist optional.
|
||||
|
||||
DATENSPARSAM GEBAUT
|
||||
• Kein Konto, keine Anmeldung, kein Profil.
|
||||
• Keine Analyse- oder Crash-SDKs im Build.
|
||||
• Werbung nur mit Einwilligung (EU/UK/CH: Abfrage beim ersten Start), jederzeit
|
||||
widerrufbar über Einstellungen → Datenschutz-Optionen.
|
||||
• Löschanfrage direkt in der App, mit vorausgefüllter E-Mail.
|
||||
|
||||
TECHNISCH
|
||||
• Simulation in Rust, festkomma-basiert und plattformübergreifend identisch.
|
||||
• Kompakte Installation, keine zusätzlichen Downloads nach dem ersten Start.
|
||||
• Für Android 7.0 und neuer.
|
||||
|
||||
IRON ARC ist bewusst klein: ein Duell, ein Bildschirm, keine Ablenkung.
|
||||
```
|
||||
|
||||
### Was ist neu (max. 500 Zeichen)
|
||||
|
||||
```
|
||||
0.9.0
|
||||
• „Werbung entfernen“ als einmaliger Kauf (Play Billing)
|
||||
• Käufe wiederherstellen direkt in den Einstellungen
|
||||
• Lokale Daten lassen sich jetzt in der App löschen
|
||||
• Neue Spielgrafik: Dämmerungshimmel, Bergketten mit Tiefenwirkung, detaillierte Panzer
|
||||
• Startbildschirm ohne weißes Aufblitzen
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Store-Eintrag — English
|
||||
|
||||
### App name (max. 30)
|
||||
|
||||
```
|
||||
Iron Arc: Artillery Duel
|
||||
```
|
||||
|
||||
### Short description (max. 80)
|
||||
|
||||
```
|
||||
Turn-based tank artillery duels with destructible terrain. Win in 3 minutes.
|
||||
```
|
||||
|
||||
### Full description (max. 4000)
|
||||
|
||||
```
|
||||
One shot. One crater. No luck.
|
||||
|
||||
IRON ARC is a turn-based artillery duel for two players on one device.
|
||||
You aim with a swipe, dial in the power and leave the rest to physics: slope, wind
|
||||
and your read of where the ground will give way.
|
||||
|
||||
WHAT MAKES IT DIFFERENT
|
||||
• Determinism instead of dice: every shot is reproducible. Same input, same result -
|
||||
on every device.
|
||||
• Destructible terrain: every hit carves a crater. After three rounds no map looks
|
||||
like it did at the start.
|
||||
• Wind, slope, ammo: three variables to read instead of waiting for a lucky roll.
|
||||
• No grind, no timers: open it and play. No energy, no waiting.
|
||||
|
||||
HOW TO PLAY
|
||||
1. Drag: set direction and power - the dotted line previews the arc.
|
||||
2. Release: the shell flies, digs in, reshapes the ground.
|
||||
3. Answer: your opponent takes the turn. Alternate until one tank is out of armour.
|
||||
A match rarely takes longer than three minutes - perfect for a lunch break.
|
||||
|
||||
FAIR STAYS FAIR
|
||||
• No pay-to-win. Buying gets you convenience or cosmetics, never an advantage.
|
||||
• "Remove ads" is a one-time purchase; rewarded ads always stay optional.
|
||||
• Playable offline. Online sync is optional.
|
||||
|
||||
BUILT TO COLLECT LITTLE
|
||||
• No account, no sign-up, no profile.
|
||||
• No analytics or crash SDKs in the build.
|
||||
• Ads only with consent (asked on first start in the EU/UK/CH), revocable any time
|
||||
under Settings → Privacy options.
|
||||
• Deletion request right in the app, with a pre-filled email.
|
||||
|
||||
TECHNICAL
|
||||
• Simulation written in Rust, fixed-point and identical across platforms.
|
||||
• Compact install, no extra downloads after first launch.
|
||||
• Runs on Android 7.0 and newer.
|
||||
|
||||
IRON ARC is deliberately small: one duel, one screen, no distractions.
|
||||
```
|
||||
|
||||
### What's new (max. 500)
|
||||
|
||||
```
|
||||
0.9.0
|
||||
• "Remove ads" as a one-time purchase (Play Billing)
|
||||
• Restore purchases directly in Settings
|
||||
• Local data can now be deleted inside the app
|
||||
• New game art: dusk sky, layered ridges, detailed tanks
|
||||
• Splash screen without the white flash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Grafik (gegen den Build geprüft)
|
||||
|
||||
| Asset | Datei | Größe | Play-Anforderung | Status |
|
||||
|---|---|---|---|---|
|
||||
| App-Icon | `store/assets/icon_512.png` | 512 × 512 | 512 × 512, 32-bit PNG | ✅ |
|
||||
| Feature-Graphic | `store/assets/feature_1024x500.png` | 1024 × 500 | 1024 × 500 | ✅ |
|
||||
| Screenshots Telefon | `store/screenshots/01..04*.png` | 1080 × 1920 (16:9) | 2–8 Stück, 320–3840 px, max. 2:1 | ✅ 4 Stück |
|
||||
| Roboterfassungen | `store/screenshots/raw/*.png` | 1080 × 2400 | nur Arbeitsmaterial | – |
|
||||
| Tablet-Screenshots | – | – | optional (7"/10") | ⬜ |
|
||||
| Promo-Video | – | – | optional (30 s, YouTube) | ⬜ |
|
||||
|
||||
**Wichtig:** Die Rohaufnahmen sind 1080 × 2400 (9:20 = 2,22:1) und werden von Play
|
||||
**abgelehnt**. `tools/art/gen_screens.py` rahmt sie auf 1080 × 1920 (16:9) mit Markenhintergrund.
|
||||
Nach jeder sichtbaren Änderung: neu aufnehmen, Skript laufen lassen.
|
||||
|
||||
**Screenshot 04 (`04_settings`) zeigt aktuell „Keine Produkte im Play Store angelegt“.**
|
||||
Das ist der korrekte Zustand vor dem Console-Setup, wirkt im Store aber wie ein Fehler.
|
||||
Sobald `remove_ads` angelegt und ein Track veröffentlicht ist: App öffnen, Einstellungen,
|
||||
neu aufnehmen (`adb exec-out screencap -p > store/screenshots/raw/04_settings.png`),
|
||||
`python3 tools/art/gen_screens.py`.
|
||||
|
||||
---
|
||||
|
||||
## 5. App-Inhalte — Fragebogen
|
||||
|
||||
### Werbung
|
||||
| Frage | Antwort |
|
||||
|---|---|
|
||||
| Enthält die App Werbung? | **Ja** |
|
||||
| Werbe-SDK | Google AdMob (`google_mobile_ads`) |
|
||||
| Einwilligung vor Werbung | Ja, UMP-Formular vor der ersten Anfrage (EU/UK/CH) |
|
||||
|
||||
### In-App-Käufe
|
||||
| Frage | Antwort |
|
||||
|---|---|
|
||||
| Digitale Güter über Play Billing? | **Ja** – `in_app_purchase`, Produkt `remove_ads` (4,99 €) |
|
||||
| Abo? | Nein |
|
||||
| Lootboxen / Zufallskäufe? | Nein |
|
||||
|
||||
### Zielgruppe und Inhalt
|
||||
| Frage | Antwort |
|
||||
|---|---|
|
||||
| Zielgruppe | **13+** |
|
||||
| Für Kinder gestaltet? | **Nein** (kein Families-Programm) |
|
||||
| Spricht Kinder an? | Nein |
|
||||
| Nutzer-Interaktion (Chat, UGC, Profile)? | **Nein** – 2 Spieler an einem Gerät |
|
||||
| Standortfreigabe? | Nein |
|
||||
| News-App / COVID / Regierung / Finanzen / Gesundheit? | Nein, alles |
|
||||
|
||||
### Inhaltsbewertung (IARC)
|
||||
| Kategorie | Antwort |
|
||||
|---|---|
|
||||
| Art | **Spiel** |
|
||||
| Gewalt | **Ja** – Cartoon-/Fantasy-Gewalt: Panzer beschießen sich, Explosionen, kein Blut, keine Menschendarstellung |
|
||||
| Häufigkeit/Intensität | Gelegentlich / mild |
|
||||
| Angst/Horror | Nein |
|
||||
| Sexuelle Inhalte | Nein |
|
||||
| Sprache | Nein |
|
||||
| Drogen/Alkohol/Tabak | Nein |
|
||||
| Glücksspiel (echt oder simuliert) | Nein |
|
||||
| Datenaustausch mit Dritten | Nein |
|
||||
| Digitale Käufe | **Ja** |
|
||||
| Werbung | **Ja** |
|
||||
|
||||
Erwartete Einstufung (Erfahrungswert, nicht garantiert): **USK 6 / PEGI 7 / ESRC „Everyone 10+“**.
|
||||
|
||||
---
|
||||
|
||||
## 6. Datensicherheit (Data Safety)
|
||||
|
||||
Grundlage: `aapt2 dump permissions` auf dem Release-APK und ein Grep über alle
|
||||
Netzwerkziele im Dart-Code. Ergebnis: Die App sendet **keine** Daten an eigene Server
|
||||
(einziger Ziel-Host im Code ist `http://127.0.0.1:8080`, der lokale Entwicklungs-Referee).
|
||||
Alles, was das Gerät verlässt, geht an Google (AdMob, Play Billing).
|
||||
|
||||
### Schritt 1 — Übersicht
|
||||
|
||||
| Frage | Antwort |
|
||||
|---|---|
|
||||
| Erhebt oder teilt die App Nutzerdaten? | **Ja** |
|
||||
| Alle Daten verschlüsselt übertragen? | **Ja** (TLS zu Google) |
|
||||
| Möglichkeit, Löschung zu verlangen? | **Ja** |
|
||||
| Unabhängige Sicherheitsprüfung? | Nein |
|
||||
|
||||
### Schritt 2 — Datenarten
|
||||
|
||||
| Datenart | Erhoben | Geteilt | Zweck | Optional? | Flüchtig? |
|
||||
|---|---|---|---|---|---|
|
||||
| **Geräte- oder andere IDs** (Werbe-ID, App-Set-ID) | Ja | **Ja** (Google) | Werbung/Marketing, Analyse | Nein (Werbung ist Standard) | Nein |
|
||||
| **Ungefährer Standort** (aus IP, durch AdMob) | Nein | **Ja** (Google) | Werbung/Marketing | Nein | Nein |
|
||||
| Absturzprotokolle, Diagnose | Nein | – | – | – | – |
|
||||
| App-Aktivität, Suchverlauf, Käufe, Kontakte, Fotos, Dateien | Nein | – | – | – | – |
|
||||
|
||||
**Advertising ID:** „Verwendet die App die Werbe-ID?“ → **Ja** (`com.google.android.gms.permission.AD_ID`
|
||||
ist im Manifest, gesetzt vom AdMob-SDK).
|
||||
|
||||
**Begründung der Standort-Zeile:** Die App selbst liest keinen Standort (keine
|
||||
`ACCESS_FINE/COARSE_LOCATION`-Berechtigung), aber AdMob leitet aus der IP-Adresse eine
|
||||
grobe Region ab und teilt sie mit Google. Das muss deklariert werden.
|
||||
|
||||
### Schritt 3 — Löschung
|
||||
|
||||
| Feld | Antwort |
|
||||
|---|---|
|
||||
| Löschung möglich? | Ja |
|
||||
| Weg | Einstellungen → **Datenlöschung anfragen** (vorausgefüllte E-Mail mit Geräte-ID) und Einstellungen → **Lokale Daten löschen** |
|
||||
| Kontakt | `softwareapp.hb@gmail.com` |
|
||||
| Werbe-Daten | über Google-Konto → Werbeeinstellungen (Link in der Datenschutzerklärung) |
|
||||
|
||||
### Pflege-Hinweis
|
||||
|
||||
Sobald der Referee-Server produktiv ist und die Geräte-ID dorthin übertragen wird, muss
|
||||
zusätzlich deklariert werden: **Geräte- oder andere IDs → Erhoben, Zweck App-Funktionalität,
|
||||
nicht geteilt.** Die Datenschutzerklärung deckt das bereits ab.
|
||||
|
||||
---
|
||||
|
||||
## 7. Berechtigungen im Release (geprüft)
|
||||
|
||||
| Berechtigung | Herkunft | Deklaration nötig? |
|
||||
|---|---|---|
|
||||
| `INTERNET`, `ACCESS_NETWORK_STATE` | App (Referee-Sync) | nein |
|
||||
| `com.android.vending.BILLING` | Play Billing | nein |
|
||||
| `com.google.android.gms.permission.AD_ID` | AdMob | **ja** (Data Safety, Werbe-ID) |
|
||||
| `ACCESS_ADSERVICES_AD_ID/ATTRIBUTION/TOPICS` | AdMob (Privacy Sandbox) | nein |
|
||||
| `WAKE_LOCK`, `FOREGROUND_SERVICE` | AdMob SDK | nein |
|
||||
|
||||
Keine Kamera, kein Mikrofon, kein Standort, kein Speicherzugriff, kein `QUERY_ALL_PACKAGES`.
|
||||
|
||||
---
|
||||
|
||||
## 8. Reihenfolge beim ersten Upload
|
||||
|
||||
1. **App anlegen** (Abschnitt 1), dann Store-Eintrag (Abschnitte 2/3) ausfüllen.
|
||||
2. **Grafik** hochladen (Abschnitt 4) — Icons, Feature-Graphic, 4 Screenshots.
|
||||
3. **App-Inhalte** beantworten (Abschnitt 5): Werbung, IAP, Zielgruppe, IARC.
|
||||
4. **Data Safety** ausfüllen (Abschnitt 6) — Werbe-ID nicht vergessen.
|
||||
5. **Produkt anlegen**: `remove_ads`, Einmalig, 4,99 €, aktivieren.
|
||||
6. **Internal Testing** anlegen, `~/exports/iron-arc-0.9.0.aab` hochladen,
|
||||
Lizenz-Testkonto eintragen, Release-Notes aus Abschnitt 2 einsetzen.
|
||||
7. Nach dem Rollout: `bundletool`-Split-APKs auf dem Gerät testen (MIUI blockt
|
||||
`adb install` von Release-APKs, siehe `docs/testing.md`).
|
||||
|
||||
---
|
||||
|
||||
## 9. Was Play ablehnen würde (aus dem Code geprüft)
|
||||
|
||||
- Screenshots mit Seitenverhältnis > 2:1 → behoben durch `tools/art/gen_screens.py`.
|
||||
- Fehlende Werbe-ID-Deklaration → in Abschnitt 6 vorbereitet.
|
||||
- Datenschutz-URL, die nicht erreichbar ist → HTTP 200 geprüft, aber `text/plain`
|
||||
(siehe `docs/status/blocked.md` §3b für den besseren Host).
|
||||
- Fehlende Anschrift in der Datenschutzerklärung → offen (§3a), rechtlich relevant.
|
||||
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 196 KiB |
@@ -0,0 +1,114 @@
|
||||
"""Frames raw device captures into Play-ready store screenshots.
|
||||
|
||||
Play accepts phone screenshots with an aspect ratio up to 2:1. The Redmi Note
|
||||
10 captures are 1080x2400 (9:20 = 2.22:1) and would be rejected, so each shot is
|
||||
scaled down and composited onto a 1080x1920 brand canvas: 16:9, no cropping of
|
||||
the UI, and the frame gives the store page a consistent look.
|
||||
|
||||
python3 tools/art/gen_screens.py
|
||||
|
||||
Raw captures live in store/screenshots/raw/, the framed results replace
|
||||
store/screenshots/01..04. Re-capture the raw shots after any visible change:
|
||||
|
||||
adb exec-out screencap -p > store/screenshots/raw/01_aiming.png
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFilter
|
||||
|
||||
import artlib as A
|
||||
|
||||
P = A.Palette.load()
|
||||
SCREENS = A.ROOT / "store" / "screenshots"
|
||||
RAW = SCREENS / "raw"
|
||||
|
||||
CANVAS = (1080, 1920)
|
||||
SHOT_HEIGHT = 1660 # leaves 130 px breathing room top and bottom
|
||||
CORNER = 34
|
||||
|
||||
|
||||
def _background() -> Image.Image:
|
||||
"""Vertical ink gradient with a warm glow behind the phone, plus vignette."""
|
||||
w, h = CANVAS
|
||||
img = Image.new("RGB", CANVAS, P.color("ink.0"))
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
top = (5, 7, 10)
|
||||
mid = (16, 27, 41)
|
||||
bottom = (8, 10, 14)
|
||||
for y in range(h):
|
||||
t = y / (h - 1)
|
||||
if t < 0.55:
|
||||
k = t / 0.55
|
||||
color = tuple(int(top[i] + (mid[i] - top[i]) * k) for i in range(3))
|
||||
else:
|
||||
k = (t - 0.55) / 0.45
|
||||
color = tuple(int(mid[i] + (bottom[i] - mid[i]) * k) for i in range(3))
|
||||
draw.line([(0, y), (w, y)], fill=color)
|
||||
|
||||
glow = Image.new("RGB", CANVAS, (0, 0, 0))
|
||||
gd = ImageDraw.Draw(glow)
|
||||
gd.ellipse([w * 0.05, h * 0.18, w * 0.95, h * 0.82], fill=(90, 52, 20))
|
||||
glow = glow.filter(ImageFilter.GaussianBlur(180))
|
||||
return Image.blend(img, Image.blend(img, glow, 0.35), 0.55)
|
||||
|
||||
|
||||
def _rounded(img: Image.Image, radius: int) -> Image.Image:
|
||||
mask = Image.new("L", img.size, 0)
|
||||
ImageDraw.Draw(mask).rounded_rectangle([0, 0, img.size[0] - 1, img.size[1] - 1],
|
||||
radius=radius, fill=255)
|
||||
out = img.convert("RGBA")
|
||||
out.putalpha(mask)
|
||||
return out
|
||||
|
||||
|
||||
def frame(raw: Path, out: Path) -> Path:
|
||||
shot = Image.open(raw).convert("RGB")
|
||||
scale = SHOT_HEIGHT / shot.height
|
||||
shot = shot.resize((int(shot.width * scale), SHOT_HEIGHT), Image.LANCZOS)
|
||||
shot = _rounded(shot, CORNER)
|
||||
|
||||
canvas = _background().convert("RGBA")
|
||||
x = (CANVAS[0] - shot.width) // 2
|
||||
y = (CANVAS[1] - SHOT_HEIGHT) // 2
|
||||
|
||||
shadow = Image.new("RGBA", CANVAS, (0, 0, 0, 0))
|
||||
ImageDraw.Draw(shadow).rounded_rectangle(
|
||||
[x + 10, y + 26, x + shot.width + 10, y + SHOT_HEIGHT + 26],
|
||||
radius=CORNER, fill=(0, 0, 0, 150))
|
||||
shadow = shadow.filter(ImageFilter.GaussianBlur(28))
|
||||
canvas = Image.alpha_composite(canvas, shadow)
|
||||
|
||||
# Hairline edge so the frame reads as a device, not a pasted image.
|
||||
edge = Image.new("RGBA", CANVAS, (0, 0, 0, 0))
|
||||
ImageDraw.Draw(edge).rounded_rectangle(
|
||||
[x - 1, y - 1, x + shot.width, y + SHOT_HEIGHT],
|
||||
radius=CORNER + 1, outline=(255, 255, 255, 40), width=2)
|
||||
canvas = Image.alpha_composite(canvas, edge)
|
||||
canvas.paste(shot, (x, y), shot)
|
||||
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
canvas.convert("RGB").save(out, optimize=True)
|
||||
return out
|
||||
|
||||
|
||||
def main() -> int:
|
||||
raws = sorted(RAW.glob("*.png"))
|
||||
if not raws:
|
||||
print(f"no raw captures in {RAW} - run the adb captures first", file=sys.stderr)
|
||||
return 1
|
||||
for raw in raws:
|
||||
target = SCREENS / raw.name
|
||||
frame(raw, target)
|
||||
print(f" {target.relative_to(A.ROOT)} {Image.open(target).size}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||