Skip to content

resources: re-encode Android day-cycle scenes as WebP (−1.4 MB, ~86%)#48

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
MrL0:perf/android-scene-webp
Jul 8, 2026
Merged

resources: re-encode Android day-cycle scenes as WebP (−1.4 MB, ~86%)#48
ryanbr merged 1 commit into
ryanbr:mainfrom
MrL0:perf/android-scene-webp

Conversation

@MrL0

@MrL0 MrL0 commented Jul 7, 2026

Copy link
Copy Markdown

What & why

Android ships the same day-cycle scene backdrops (scene1scene10, in res/drawable-nodpi/) as PNG — ~1.7 MB. Re-encoding as WebP (quality 85) drops that to ~0.24 MB — an 86% / ~1.4 MB reduction, with no code change: the drawables are referenced by name (R.drawable.sceneN via painterResourceSceneHeroBackground.kt), so the resource name is unchanged and Android decodes WebP natively.

WebP is the Android-native efficient image format (decode since API 14, first-class res/drawable resource, and what Android Studio's Convert to WebP… produces).

before (PNG) after (WebP)
10 scene drawables 1.7 MB 0.24 MB (−86%)

Companion to the iOS HEIC change in #46 — same win, platform-native format each side.

Verification

  • Pillow WebP encode, quality 85; resource names unchanged; Android CI (Gradle) builds it.
  • I can't render it here, so please eyeball a bright scene (scene10, midday) for sky banding — the hero backdrop is heavily dimmed/masked, so artifacts are invisible there.

Checklist

  • Assets only — no code changed
  • No new build warnings expected (name-referenced drawables; unchanged names)
  • UI changes use only StrandDesign tokens — n/a
  • No hardcoded hex frame bytes — n/a

Re-encoded via an AI-assisted pass; resource names verified and size measured locally. Please sanity-check rendering on a bright scene.

The same scene1..scene10 backdrops in res/drawable-nodpi shipped as PNG (~1.7MB). Re-encode as WebP (quality 85) -> ~0.24MB, an 86% reduction, no code change: drawables are referenced by name (R.drawable.sceneN via painterResource in SceneHeroBackground.kt) so the resource name is unchanged and Android decodes WebP natively. Companion to the iOS HEIC change (#46).
@ryanbr ryanbr merged commit b77f376 into ryanbr:main Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants