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

Allow disabling all alpha optimizations when used as a library #181

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Conversation

drojf
Copy link
Contributor

@drojf drojf commented Jul 14, 2019

I was using oxipng as a library, and wanted to disable all alpha optimizations (to be fully lossless). I setting the alphas field of the Option struct to an empty hashset, but I hit an assert in the library.

I didn't see any reason why the assert should be there, so I removed the assert, and made the function apply no processing if the hashset was empty. I didn't encounter any problems converting some files (they came out as identical), and cargo test passed for me.

I've made this pull request just in case this assert is no longer needed. If it's actually there for good reason you can close this pull request.

@shssoichiro
Copy link
Owner

This does seem like a bug. In fact, I'd like to go further and go along with the idea that the default should be to not optimize alphas. That can be done in a separate PR. I'll merge this for now to get your workflow unblocked. Thanks!

@shssoichiro shssoichiro merged commit 4cb26d4 into shssoichiro:master Jul 23, 2019
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