Skip to content

Conversation

@vostrnad
Copy link
Contributor

Restores chart thumbnails to their original 1296 x 650 resolution and reduces their total size by ~45%. The original resolution works better for the 16:9 ratio they're displayed in as this crops them horizontally (trimming off time ranges at the edges) instead of vertically (trimming off graph values).

@vostrnad vostrnad force-pushed the optimizeder-thumbnails branch from 770a85b to 2ca0d24 Compare January 16, 2026 02:19
@0xB10C
Copy link
Owner

0xB10C commented Jan 16, 2026

Definitely in favor of merging this, but would be good for me to figure out why my images are larger... Is the optipng you're using more aggressive by default?

@0xB10C
Copy link
Owner

0xB10C commented Jan 16, 2026

optipng -h prints -o <level> optimization level (0-7) [default: 2] for me.

@vostrnad
Copy link
Contributor Author

vostrnad commented Jan 16, 2026

I don't know if optipng has anything to do with it, as mentioned in #118 (comment) running it on the existing thumbnails barely made a difference. One thing I did notice is that I'm using optipng version 7.9.1 while the version used by the GitHub workflow is 0.7.8 which is apparently from 2017 2023. It could be that the running the old version and then the new one produces worse results than running the new version outright. Or it could be that the difference occurs at the point of generating the images due to OS or hardware differences, in which case I don't hope to ever understand it.

I tested different optimization levels, for most thumbnails the higher levels produce a byte-for-byte identical result, and the rest are improved by less than 1%.

@0xB10C
Copy link
Owner

0xB10C commented Jan 17, 2026

I plan to experiment a bit if I can reproduce this on Windows.

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