golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.73k stars 17.63k forks source link

image/jpeg: encoding with RGB profile causing loss of image saturation #23936

Open kiwionly opened 6 years ago

kiwionly commented 6 years ago

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.9.2

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

windows 10

What did you do?

I encoding a JPEG file with RGB profile, some how the encoding result look like not correct, I using gimp and it compress correctly, the output result show a bit darker then the original image.

here the code from go playground

Original image

de5639288c6fdd52367180fdcbd7a79672dbdf1d84e11bf2a497114397070bbb

After encode

out

The images diff

download

What did you expect to see?

berry_gimp

What did you see instead?

lanczos3

odeke-em commented 6 years ago

/cc @nigeltao @fogleman