SFML community forums

Help => Graphics => Topic started by: EnchPonch on April 11, 2019, 07:58:34 pm

Title: Problems with texture colors
Post by: EnchPonch on April 11, 2019, 07:58:34 pm
Hi! I'm trying to show texture in window and some colors looks completely different from the original, mostly in the dark places. For example, here's the part of original texture (screenshot from windows viewer):
https://i.imgur.com/96eByBq.png
And here is the same place, but how it appears on window surface:
https://i.imgur.com/rBiCnej.png

As you can see, colors in the top and bottom parts of original texture are almost the same in terms of darkness, so border between them is almost unnoticeable. But there's clear color difference between parts in the surface's screenshot, so it looks definitely not like I want.
I tried to enable and disable smooth, Srgb (for texture), change antialiasing level, bytesinpixel in videomode, depth in window settings - nothing helped. Can you help me, please? I just want to preserve colors from original picture (it has 32 bit depth).
Title: Re: Problems with texture colors
Post by: Laurent on April 11, 2019, 08:11:40 pm
Hi

Can you post a minimal and complete code that reproduces this problem? Can you post the texture image too?
Title: Re: Problems with texture colors
Post by: EnchPonch on April 11, 2019, 11:08:38 pm
Sorry that I bothered you, actually texture looked as on first screenshot only in windows photo viewer. I remade it and everything is ok now  :)