Skip to content

Convert some data/example images to webp #3362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

damusss
Copy link
Member

@damusss damusss commented Mar 1, 2025

I was inspired by #3358 and tackled some examples/data images. The size difference is not as great as starbuck's, but it's still 0.107 megabytes, take it or leave it. I considered converting wav to ogg, but the filesize was basically the same, I can add the conversion or convert them to a different formats if you know one. I didn't touch GIFs because I'm unsure why they are gifs in the first place, don't know if it'll break anything. Finally some images were required of their formats by some tests, so I left them. Oh, I also fixed a bug when using randint.
Yes, I made sure I enabled the lossless option when converting.

Details:

  • arraydemo.bmp -> .webp = 76854->39180 (-37674)

  • chimp.png -> .webp = 826->622 (-204)

  • static.png -> .webp = 1202->508 (-694)

  • cursor.png -> .webp = 2708->960 (-1748)

  • fist.png -> .webp = 86196->48246 (-37950)

  • frame.png -> .webp = 253->124 (-129)

  • liquid.bmp -> .webp = 11734->1810 (-9924)

  • midikeys.png -> .webp = 19666->9520 (-10146)

  • deleted danger.gif: -2761 (not used in codebase)

  • deleted blue.mpg: -6144 (not used in codebase)

Total bytes saved: 107,374

@damusss damusss requested a review from a team as a code owner March 1, 2025 18:46
@Starbuck5
Copy link
Member

@damusss I hadn't considered data/examples, since I know some of them are used specifically in tests. The other place I was looking was https://github.com/pygame-community/pygame-ce/tree/main/docs/reST/tutorials/assets

@damusss
Copy link
Member Author

damusss commented Mar 1, 2025

@Starbuck5 I'll do that folder next. Anyways only chimp was used in a test that didn't need PNG, so where it was crucial to keep the format I kept it, no worries about that.

@MyreMylar MyreMylar closed this Mar 3, 2025
@MyreMylar MyreMylar reopened this Mar 3, 2025
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK LGTM 👍

Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@Matiiss Matiiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Matiiss Matiiss merged commit 2fb2e04 into pygame-community:main Mar 6, 2025
77 of 78 checks passed
@damusss damusss deleted the examples-data-to-webp branch March 11, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants