Hi txesmi,

Im using Photoshop and the TGA format.
I opened it with gimp and it shows the correct values. There was no problem within the code.
I also tried to open it with photoshop, saved it and reopened it with gimp. Still showing the correct values.

I dont know why photoshop is doing it, but problem solved ^^

Thank you