-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
proposal: image/png: Add HuffmanOnly compression levels. #59023
Comments
Change https://go.dev/cl/476017 mentions this issue: |
Are you proposing adding a new API to the image/png package? (Adding an exported constant is a new API.) If so, you'll need to follow the proposal process, see https://golang.org/s/proposal . Thanks. |
Is it better to edit this issue (#59023) now as a template for a proposal? Thanks for your help. |
@HyeockJinKim Either way is fine. Thanks. |
I've created it according to the proposal template. Can you review it? @ianlancetaylor |
It would also be nice to work on supporting all zlib compression levels from 1-9, would you mind if I put that in the proposal as well? |
Sure, you can update the proposal. But you used the wrong template. You used the one for a language or incompatible library change (Go 2) not the one for a simple additional proposal. May be easier to start a new issue at this point. Thanks. |
I've rewritten it, please review it again. 😢 |
CC @nigeltao |
Adding Optionally, if you also want to implement this (below) in
In hindsight, it would have been nice if the numeric values were consistent (and, perhaps, that 0 meant "default"). But it's too late to change existing constants. |
Shall I add to CL to receive compression levels of 1-9? |
I'm OK with that, but I'd also wait until there's a formal response to the proposal. |
Problem:
The HuffmanOnly option, which only performs Huffman encoding, is supported by the zlib library, but not by png using zlib.
Solution
Add a HuffmanOnly
const
to image/png.Golang developer can pass the HuffmanOnly option with the code below and get a PNG with only huffman encoding.
The text was updated successfully, but these errors were encountered: