Skip to content
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

[Enhancement]: Compress Mii images #147

Open
1 task done
jonbarrow opened this issue Jan 25, 2025 · 2 comments
Open
1 task done

[Enhancement]: Compress Mii images #147

jonbarrow opened this issue Jan 25, 2025 · 2 comments
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase

Comments

@jonbarrow
Copy link
Member

jonbarrow commented Jan 25, 2025

Checked Existing

  • I have checked the repository for duplicate issues.

What enhancement would you like to see?

After rendering the Mii images, they can be somewhat large. They can be compressed however to save quite a bit of space (according to @InternalLoss they can be taken down from ~10KB to ~4KB). This saves both storage costs and time when rendering many Mii's on platforms like Juxt

Any other details to share? (OPTIONAL)

Right now the PNG renders are just straight from Mii Studio, no added compression. Using something like Sharp we can set a zlib compression level to get things down

For TGAs we use https://www.npmjs.com/package/tga, which does support RLE compression for parsing but not for output. We have our own TGA implementation here https://github.com/PretendoNetwork/pictobox/blob/master/src/tga.ts, however it also does not support RLE compression for output. It might be worth considering adding RLE to pictobox and then also compression the TGAs?

@jonbarrow jonbarrow added approved The topic is approved by a developer enhancement An update to an existing part of the codebase labels Jan 25, 2025
@shutterbug2000
Copy link

It may be worth ensuring that the Wii U and 3DS support RLE for TGA images (iirc the TGA support on Wii U has quirks, but I could be mistaken)

@jonbarrow
Copy link
Member Author

Good point, it does have weird quirks so it's possible it doesn't support RLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase
Projects
Status: Todo
Development

No branches or pull requests

2 participants