stb icon indicating copy to clipboard operation
stb copied to clipboard

stbir_resize_uint8_srgb should return same color space with src input.

Open qiutanguu opened this issue 3 years ago • 1 comments

hi, i found stbir_resize_uint8_srgb decode srgb image to linear space before process, but when process done, data don't encode back to srgb color space. I think there should exist one option or explanation to notify user know current image data under which colorspace.

qiutanguu avatar Jul 05 '22 14:07 qiutanguu

Do you have an example? There is another GitHub issue featuring the same function (https://github.com/nothings/stb/issues/1338), which shows an example where the output values are returned correctly in sRGB.

I believe this is the relevant part in the source code: https://github.com/nothings/stb/blob/af1a5bc352164740c1cc1354942b1c6b72eacb8a/stb_image_resize.h#L1768

karrih avatar Aug 01 '22 19:08 karrih

stb_image_resize definitely converts back from linear to sRGB when writing by default, unless you explicitly ask it not to. No repro provided and it's been months so I'm closing this issue.

rygorous avatar Jan 22 '23 22:01 rygorous