I have a game with the latest SDL2 and SDL2_image and Mac OSX Mavericks -
XCode 5.
I load 32 bit PNG images with alpha and I get minor color differences.
Eg: if I load a 32bit alpha, png (via IMG_Load() with red (with the
colors: R=165,G=24,B=30 made with photoshop) and load it into a surface
and then OpenGL via ‘glTexImage2D’ it works but I get a red with small
differences: (R=166,G=32,B=36).
The same code worked ok when compiled in the same PC before update: a Mac
OSX 10.8 machine with XCode 4.X.
Did Photoshop save a gamma adjustment, and did your PNG loader apply the adjustment?On 12/06/2013 10:04 AM, Giorgos Sarris wrote:
Hi,
I have a game with the latest SDL2 and SDL2_image and Mac OSX Mavericks - XCode 5.
I load 32 bit PNG images with alpha and I get minor color differences.
Eg: if I load a 32bit alpha, png (via IMG_Load() with red (with the colors:
R=165,G=24,B=30 made with photoshop) and load it into a surface and then OpenGL
via ‘glTexImage2D’ it works but I get a red with small differences:
(R=166,G=32,B=36).
The same code worked ok when compiled in the same PC before update: a Mac OSX
10.8 machine with XCode 4.X.
The same code worked ok when compiled in the same PC before update: a Mac OSX
10.8 machine with XCode 4.X.
IMG_Load() uses the system frameworks on Mac OS X, so upgrading to
Mavericks means it might be doing something different with the same binary.
Alternately: did Xcode start premultiplying alpha in PNGs? I think I
read it does this when packaging up iOS apps, but maybe I’m mistaken.
Check if the .png file is different in the final build vs what you supplied.