Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixes for grey scale reduction - #171

Merged
shssoichiro merged 1 commit into
oxipng:masterfrom
fhanau:greyscale-fixes
Jun 18, 2019
Merged

Fixes for grey scale reduction#171
shssoichiro merged 1 commit into
oxipng:masterfrom
fhanau:greyscale-fixes

Conversation

@fhanau

@fhanau fhanau commented Jun 10, 2019

Copy link
Copy Markdown
Contributor

If I understand the color conversion code in lodepng correctly, the RGB values that are represented by 2-bit and 4-bit greyscale in bit depth reduction are wrong.
With the current implementation, oxipng corrupts a proprietary file because it thinks it can be reduced to 2-bit greyscale and quits when it detects that the result is corrupted.

@shssoichiro

Copy link
Copy Markdown
Collaborator

I assume since this is a proprietary file you wouldn't be able to make a test case out of it. But this seems reasonable. Thanks!

@shssoichiro
shssoichiro merged commit cc290c0 into oxipng:master Jun 18, 2019
@fhanau

fhanau commented Jun 20, 2019

Copy link
Copy Markdown
Contributor Author

Here's a synthetic test file created using convert -size 4x4 canvas:'#303030' -type GrayScale issue-171.png
issue-171

shssoichiro pushed a commit that referenced this pull request Jun 20, 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