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

Feature requests (from texturepacker) #12

Closed
2 of 3 tasks
jestarray opened this issue Jul 16, 2019 · 2 comments
Closed
2 of 3 tasks

Feature requests (from texturepacker) #12

jestarray opened this issue Jul 16, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jestarray
Copy link

jestarray commented Jul 16, 2019

https://www.codeandweb.com/texturepacker
has a plethora of features that'd be useful

  • pngquant compressor export option
  • trim transparent borders
  • detecting identical sprites and aliasing them in the ron file

texturepacker also has a custom exporter to template output files, so someone could try to make one for a .ron file. Only have 30 days to use a good amount of the features though so glad sheep is in the making.

@happenslol happenslol added enhancement New feature or request help wanted Extra attention is needed labels Jul 16, 2019
@happenslol
Copy link
Member

Thanks for those feature requests! I agree that those are all things we could very well use and I'd be happy to help anyone who wants to tackle these.
Some Notes:

  • There seem to be several good png optimizers written in rust, which can be used as libraries. oxipng and mtpng stand out to me and should definitely be looked at first.
  • Maybe we should split Format into something like ImageFormat and DataFormat, providing sane defaults for both. This way it would be easier to pass format options (like compression) to the part the outputs the image.
  • Trimming and aliasing should happen independently from the packing algorithm, in my opinion. We don't want to reimplement that functionality for every packer.
  • I had trimming support in the old version of this tool I wrote some years ago, so if anyone wants to tackle it, there's a very rudimentary implementation here.
  • Aliasing can be easily done by hashing the files and comparing them before the packing, then adding back removed aliases in the end. meowhash or xxhash are probably good candidates for this.

@happenslol
Copy link
Member

We've implemented both trimming and aliasing. I'll close this issue and make a new issue for export compression, so we can track this better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants