go-comic-converter icon indicating copy to clipboard operation
go-comic-converter copied to clipboard

webp decode issue

Open ssbroad opened this issue 9 months ago • 2 comments

The webp decoding package has a color conversion issue, which will affect the contrast of black-and-white images. It is recommended to use another package or switch to using dwebp for decoding.

cmd := exec.Command("dwebp.exe", "-o", "-", "--", "-") cmd.Stdin = bytes.NewReader(rawData)
cmd.Stderr = os.Stderr output, _ := cmd.Output() img, err := png.Decode(bytes.NewReader(output))

ssbroad avatar Feb 20 '25 13:02 ssbroad

I don't want to depend on an external tools. do you have an example that shown the issue, so I can play with it?

celogeek avatar Feb 20 '25 17:02 celogeek

I find one, but the render seems pretty good. I don't see the problem. Is it happening in certains cases ?

celogeek avatar Feb 20 '25 17:02 celogeek