Skip to content

pre-commit: Check for images exceeding 4096×4096#2207

Draft
wjt wants to merge 2 commits into
mainfrom
wjt/pre-commit-check-for-images-exceeding-4096-4096
Draft

pre-commit: Check for images exceeding 4096×4096#2207
wjt wants to merge 2 commits into
mainfrom
wjt/pre-commit-check-for-images-exceeding-4096-4096

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented May 16, 2026

Stacked upon #2156 which makes it easier to enable Git LFS with object caching in another workflow, which is needed.

As documented in
https://github.com/endlessm/threadbare/wiki/Visual-Style-Guide#image-file-format
this is a limitation of mobile GPUs.

Check all PNGs, JPEGs and WebPs against this limit using a small Python
program using Pillow.

Update the GitHub Actions workflow to check out objects from LFS.

See #2029

wjt added 2 commits May 15, 2026 10:10
Fix a long-standing TODO about cloning with --filter. I tried it,
couldn't make it work, and it doesn't seem worth thinking further about.

Remove fetch-tags: true (which is redundant with fetch-depth).

Factor out the clone-with-cached-lfs-objects steps to a composite
action.

Add an explicit toggle + implicit paths filter to control whether a
Windows build is needed, similar to the Flatpak build. Add a Windows
build step.

Keep the GDScript diagnostics check in the always-run web workflow.
Reorder that workflow and leave notes about why the GDScript diagnostics
& "should Windows & Flatpak builds run?" steps are in the web build.

I considered putting the two lines that build & push the Windows
artifact into the web job. It would probably be a bit faster but I think
it would make the pipeline harder to understand. I also expect further
Windows-specific stuff in future (specifically: code-signing!) which
will be clearer in a Windows-specific job.

Resolves #2156
As documented in
https://github.com/endlessm/threadbare/wiki/Visual-Style-Guide#image-file-format
this is a limitation of mobile GPUs.

Check all PNGs, JPEGs and WebPs against this limit using a small Python
program using Pillow.

Update the GitHub Actions workflow to check out objects from LFS.
@wjt
Copy link
Copy Markdown
Member Author

wjt commented May 16, 2026

https://github.com/endlessm/threadbare/actions/runs/25969999412/job/76340189768 failed successfully:

check image dimensions...................................................Failed
- hook id: check-image-size
- exit code: 1

assets/first_party/wildlife/butterfly/butterfly_air_loop_red.png: 16896x192 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_air_loop_blue.png: 16896x192 exceeds 4096x4096
scenes/menus/title/components/logos/fannypack_logo.png: 4184x1205 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_flower_loop_2_pink.png: 7040x128 exceeds 4096x4096
scenes/menus/storybook/Textures/book_turn_right.png: 9990x720 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_flower_loop_2_green.png: 7040x128 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_air_loop_green.png: 16896x192 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_flower_loop_2_red.png: 7040x128 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_flower_loop_2_blue.png: 7040x128 exceeds 4096x4096
assets/first_party/logo/threadbare-logo-animation.png: 4608x2304 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_air_loop_pink.png: 16896x192 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_air_loop_orange.png: 16896x192 exceeds 4096x4096
scenes/menus/storybook/Textures/book_turn_left.png: 9990x720 exceeds 4096x4096
assets/first_party/wildlife/butterfly/butterfly_flower_loop_2_orange.png: 7040x128 exceeds 4096x4096

#2206 will address these.

@wjt wjt linked an issue May 16, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/wjt/pre-commit-check-for-images-exceeding-4096-4096/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

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.

butterfly_air_loop_*.png textures too large for Godot

1 participant