SFML community forums

Help => Graphics => Topic started by: NGM88 on October 26, 2019, 08:10:43 am

Title: RGB Profile of png files
Post by: NGM88 on October 26, 2019, 08:10:43 am
I'm saving my png files with Adobe RGB 1998 Profile in Photoshop, but they are not being displayed with this profile in my SFML application (the saturation difference is very obvious). Other image viewing software such as Windows 10 photos app is displaying them with the correct profile, but not SFML. How can I fix this?
Title: Re: RGB Profile of png files
Post by: Laurent on October 26, 2019, 09:38:40 am
SFML doesn't apply profiles. Can't you apply it in an image editor so that your image is ready to be loaded?
Title: Re: RGB Profile of png files
Post by: NGM88 on October 26, 2019, 09:58:00 am
I assign the color profile in Photoshop and save with it.

Weird thing is, a year ago when I was using the previous version of SFML (2.5.0) with Visual Studio 2015 I didn't have this problem. Textures would look correct. I am now using 2.5.1 with Visual Studio 2019 and the textures are looking a lot less saturated. (I remember this very well because that's when I learned that I had to save the png files with that particular color profile)
Title: Re: RGB Profile of png files
Post by: Laurent on October 26, 2019, 03:02:53 pm
I'm pretty sure we changed nothing between 2.5.0 and 2.5.1 that would explain such a difference.
Title: Re: RGB Profile of png files
Post by: NGM88 on October 26, 2019, 04:29:54 pm
Must be something else then. Thanks for helping, as always.
Title: Re: RGB Profile of png files
Post by: Laurent on October 26, 2019, 09:14:29 pm
But I could have missed an upgrade of stb_image (the library used by SFML to read images), you can check its version at tag "2.5.0" and the one at tag "2.5.1", and if different, check its changelog ;)