Test lossless WebP for Breeze-owned runtime images

This commit is contained in:
waozi committed 2026-11-02 10:28:48 -03:00
1 parent 14e5412141
commit 060f5dd2b5
41 files changed
+26 -25

No files matched your search

+4 -4
View File
@@ -370,7 +370,7 @@ LOCALE_FILES := $(wildcard locales/*.txt)
# The practice media is the practices package, packaged under
# assets/practices/ (scripts/practice_media.py).
PRACTICE_MEDIA := build/packages/practices
IMAGE_FILES := assets/app/icon.png assets/easteregg/art.png assets/easteregg/waozi.png $(PRACTICE_MEDIA)/whm/1.png $(PRACTICE_MEDIA)/whm/2.png $(PRACTICE_MEDIA)/meditation/1.png assets/pet/egg1.png $(wildcard $(PRACTICE_MEDIA)/*/banner*.png) $(wildcard $(PRACTICE_MEDIA)/sunsalutation/characters/*/*.png) $(wildcard $(PRACTICE_MEDIA)/taichi/*.png $(PRACTICE_MEDIA)/taichi/*/*.png) $(PRACTICE_MEDIA)/taichi/course.tch
IMAGE_FILES := assets/app/icon.webp assets/easteregg/art.webp assets/easteregg/waozi.png $(PRACTICE_MEDIA)/whm/1.png $(PRACTICE_MEDIA)/whm/2.png $(PRACTICE_MEDIA)/meditation/1.png assets/pet/egg1.png $(wildcard $(PRACTICE_MEDIA)/*/banner*.png) $(wildcard $(PRACTICE_MEDIA)/sunsalutation/characters/*/*.png) $(wildcard $(PRACTICE_MEDIA)/taichi/*.png $(PRACTICE_MEDIA)/taichi/*/*.png) $(PRACTICE_MEDIA)/taichi/course.tch
SOUND_FILES := $(wildcard assets/sounds/*.ogg)
FONT_SUBSET_DIR := assets/fonts/subset
FONT_SUBSET_CORPUS := locales assets/fonts/input_common.txt assets/fonts/ui_symbols.txt $(PRACTICE_MEDIA)/astral_projection/text $(PRACTICE_MEDIA)/workout/text
@@ -384,8 +384,8 @@ EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
STYLE_FILES := $(wildcard $(KSS_DIR)/styles/*.kss) \
$(wildcard assets/styles/*.kss) \
$(wildcard themes/catalog_*.kss)
IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
IMAGE_FILES += $(wildcard assets/social/*.png)
IMAGE_FILES += assets/app/icon-sky-cradle.webp assets/app/icon-ink-and-air.webp
IMAGE_FILES += $(wildcard assets/social/*.png assets/social/*.webp)
IMAGE_FILES += $(KRYON_DIR)/icons/ui.png $(KRYON_DIR)/icons/pfp.png
APP_BUNDLES := $(addprefix $(BUILD_DIR)/apps/,lists.zx habits.zx practices.zx diary.zx lumi.zx leaderboard.zx)
INBE_BUNDLE := $(BUILD_DIR)/inbe.zx
@@ -397,7 +397,7 @@ APP_RESOURCES += $(wildcard apps/*/achievements.json) $(wildcard apps/*/achievem
APP_RESOURCES += $(wildcard assets/*/sidebar.shape)
APPS_BUNDLE ?= build/apps-ui/apps.zx
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) $(APPS_BUNDLE) assets/app/icon.png
EMBEDDED_ASSET_FILES := apps/publishers.json $(INBE_BUNDLE) $(APPS_BUNDLE) assets/app/icon.webp
KRY_GEN_DIR := $(BUILD_DIR)/kryon/generated
# Dependencies are imported as PACKAGE/Module through their linked packages.
ZI_PACKAGE_PATHS := $(shell sh scripts/package-paths.sh)
+2 -2
View File
@@ -541,7 +541,7 @@ FeedbackQuote :: (row: LumiChatRow, index: s32, x: s32, y: s32, width: s32) {
TypingDots :: (x: s32, top: s32) {
left := x + Scale(48)
Image(frame.session, ImageProps.{.key = cast(u64)300380,
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
.asset_path = "assets/lumi/mascot.webp", .alt_text = "Lumi",
.bounds = Bounds(x, top + Scale(16), Scale(40), Scale(40)),
.source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
.fit = cast(ImageFit)ImageFitContain})
@@ -578,7 +578,7 @@ LumiAvatar :: (index: s32, x: s32, y: s32) {
}
}
Image(frame.session, ImageProps.{.key = cast(u64)(300400 + index * 4),
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
.asset_path = "assets/lumi/mascot.webp", .alt_text = "Lumi",
.bounds = bounds, .source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
.fit = cast(ImageFit)ImageFitContain})
press := Press(frame.session, PressProps.{.key = cast(u64)(430000 + RowSlot(index) + 1),
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

+1
View File
@@ -9,6 +9,7 @@ import json
MIME_TYPES = {
".png": "image/png",
".webp": "image/webp",
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".ogg": "audio/ogg",
+3 -3
View File
@@ -34,10 +34,10 @@ for name in ('inbe', 'lists', 'habits', 'practices', 'diary', 'lumi', 'leaderboa
'practice-workout') + NODE_APPS:
(OUTPUT / name / 'assets').mkdir(parents=True)
patterns = (
'assets/mcp/*.json', 'assets/app/icon.png', 'assets/app/icon-sky-cradle.png',
'assets/app/icon-ink-and-air.png', 'assets/easteregg/*.png', 'assets/pet/*.png',
'assets/mcp/*.json', 'assets/app/icon.webp', 'assets/app/icon-sky-cradle.webp',
'assets/app/icon-ink-and-air.webp', 'assets/easteregg/*.png', 'assets/easteregg/*.webp', 'assets/pet/*.png',
'assets/apps/icons/*.png',
'assets/social/*.png',
'assets/social/*.png', 'assets/social/*.webp',
'assets/sounds/*.ogg',
'assets/habits/**/*', 'assets/lists/**/*', 'assets/diary/**/*', 'assets/lumi/**/*',
'assets/fonts/subset/*-App-Regular.*', 'assets/styles/*.kss',
+1 -1
View File
@@ -99,7 +99,7 @@ app_draw_blank_home_easteregg :: (app: *InnerBreeze) {
available_h = view_height
}
Image(CurrentApp().ui.session, ImageProps.{
.asset_path = "assets/easteregg/art.png",
.asset_path = "assets/easteregg/art.webp",
.bounds = Rectangle.{0, 0, cast(float32)view_width, cast(float32)available_h},
.fit = cast(ImageFit)ImageFitCover
})
+1 -1
View File
@@ -27,7 +27,7 @@ GetTime :: () -> float64 #foreign raylib;
// Lumi's flight cycle: eight frames facing right, then the same eight facing
// left, each 192 by 157 pixels on a 200 by 165 grid four frames wide.
LUMI_GUIDE_SHEET :: "assets/lumi/guide-flight.png"
LUMI_GUIDE_SHEET :: "assets/lumi/guide-flight.webp"
LUMI_GUIDE_WIDTH :: 72
LUMI_SHEET_FRAME_WIDTH :: 192
LUMI_SHEET_FRAME_HEIGHT :: 157
+5 -5
View File
@@ -9,19 +9,19 @@ REWARD_ICON_COUNT :: 88
RewardIconAsset :: (icon: s32) -> string {
if icon == HABIT_ICON_SODA {
return "assets/habits/rewards/soda.png"
return "assets/habits/rewards/soda.webp"
}
if icon == REWARD_ICON_COFFEE {
return "assets/habits/rewards/coffee.png"
return "assets/habits/rewards/coffee.webp"
}
if icon == REWARD_ICON_BUBBLE_TEA {
return "assets/habits/rewards/bubble-tea.png"
return "assets/habits/rewards/bubble-tea.webp"
}
if icon == REWARD_ICON_CHOCOLATE {
return "assets/habits/rewards/chocolate.png"
return "assets/habits/rewards/chocolate.webp"
}
if icon == REWARD_ICON_CANDLE {
return "assets/habits/rewards/candle.png"
return "assets/habits/rewards/candle.webp"
}
return ""
}
+1 -1
View File
@@ -268,7 +268,7 @@ ConfigureWindow :: () {
FinishWindowSetup :: () -> s32 {
icon_path: [64]u8
if !CopyCString("assets/app/icon.png", icon_path[:]) ||
if !CopyCString("assets/app/icon.webp", icon_path[:]) ||
native_after_window(*icon_path[0]) == 0 {
return 0
}
+1 -1
View File
@@ -303,7 +303,7 @@ SaveTrayIcon :: (path: *u8, data: *u8, size: s32) -> bool #foreign raylib "SaveF
TrayIconFromAssets :: () -> string {
asset_path: [32]u8
if !CopyCString("assets/app/icon.png", asset_path[:]) {
if !CopyCString("assets/app/icon.webp", asset_path[:]) {
return ""
}
asset := asset_lookup(*asset_path[0])
+4 -4
View File
@@ -180,12 +180,12 @@ ABOUT_SOCIAL_GITHUB :: 2
about_social_icon_asset :: (app: *InnerBreeze, kind: s32) -> string {
if kind == ABOUT_SOCIAL_TELEGRAM {
return "assets/social/telegram.png"
return "assets/social/telegram.webp"
}
if kind == ABOUT_SOCIAL_GITHUB {
return ifx (app != null && app.dark_mode == 0) then ("assets/social/github-dark-on-light.png") else ("assets/social/github-light-on-dark.png")
return ifx (app != null && app.dark_mode == 0) then ("assets/social/github-dark-on-light.webp") else ("assets/social/github-light-on-dark.webp")
}
return "assets/social/discord.png"
return "assets/social/discord.webp"
}
about_social_icon_alt :: (kind: s32) -> string {
@@ -250,7 +250,7 @@ settings_about_draw :: (app: *InnerBreeze, x: s32, w: s32, y: *s32) {
y.* += AppScale(16)
Image(CurrentApp().ui.session, ImageProps.{
.asset_path = "assets/app/icon.png",
.asset_path = "assets/app/icon.webp",
.alt_text = "Inner Breeze",
.bounds = Rectangle.{cast(float32)(x + (w - logo_size) / 2), cast(float32)y.*, cast(float32)logo_size, cast(float32)logo_size}
})
+3 -3
View File
@@ -143,7 +143,7 @@ settings_theme_draw_app_icon :: (app: *InnerBreeze, section: SettingsSection,
app_open_modal(app, cast(ModalType)ModalAppIconPicker)
}
Image(app.ui.session, ImageProps.{
.asset_path = ifx (state.app_icon == 1) then ("assets/app/icon-ink-and-air.png") else ("assets/app/icon-sky-cradle.png"),
.asset_path = ifx (state.app_icon == 1) then ("assets/app/icon-ink-and-air.webp") else ("assets/app/icon-sky-cradle.webp"),
.bounds = Rectangle.{cast(float32)(section.inner_x + AppScale(8)),
cast(float32)(y.* + (row_h - icon_size) / 2),
cast(float32)icon_size, cast(float32)icon_size},
@@ -257,8 +257,8 @@ settings_screen_draw_app_icon_modal :: (app: *InnerBreeze) {
LocaleText("app_icon_sky_cradle"),
LocaleText("app_icon_ink_and_air")]
previews: [2]string = .[
"assets/app/icon-sky-cradle.png",
"assets/app/icon-ink-and-air.png"]
"assets/app/icon-sky-cradle.webp",
"assets/app/icon-ink-and-air.webp"]
gap := AppScale(12)
choice_w := (content_w - gap) / 2
{