Skip to content

Prefer full-res image if the full-res image is smaller - #1

Closed
TTtie wants to merge 1 commit into
mainfrom
tttie/fix/prefer-smaller-images
Closed

Prefer full-res image if the full-res image is smaller#1
TTtie wants to merge 1 commit into
mainfrom
tttie/fix/prefer-smaller-images

Conversation

@TTtie

@TTtie TTtie commented Aug 25, 2026

Copy link
Copy Markdown
Member

In some cases, the rendered small thumbnail can end up being larger than the full-res image, and in the worst case, the thumbnail can end up being 5 times as large as the original file. For example, https://github.com/OvercastCommunity/CommunityMaps/tree/27d0cd6d82cba386d07ed5a47ebd864db25b9c11/mixed/trial_chambers full-res image ends up at 8 KiB, while the thumbnail expands to 37-38 KiB depending on the render direction.

This PR makes it so the smaller of the two is preferred. For the time being, this is a draft that discards the thumbnail when it is larger, but we might want to look into throwing the thumbnail away if it ends yielding not much benefit in size over the full-res image.

@TTtie
TTtie force-pushed the tttie/fix/prefer-smaller-images branch from cac3f2a to 7c01d37 Compare August 25, 2026 16:26
@TTtie

TTtie commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

some changes have happened and this isn't needed anymore 🎉

@TTtie TTtie closed this Aug 25, 2026
@TTtie
TTtie deleted the tttie/fix/prefer-smaller-images branch August 25, 2026 18:23
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.

1 participant