256 color sprite displayed at wrong brightness or gamma (DEF-2093)

My sprite is a 256 color greyscale and displays too brightly in Defold (both in the editor and in the game).

It looks like the PNG gamma value might be at fault (?)

Increasing the sprite to 24-bit fixes the problem so it’s no biggy.

Also, if I change the sprite to a gradient from white to black it also then displays correctly

top: correct brightness

Thanks for reporting! Could you post the problematic png file for future testing?

No problem! Here it is.

1 Like

It looks dark on the browser here too so maybe it’s a problem just with the way you saved the 16bit pngs? I opened it in Photoshop and it looked dark too

Yes, it looks dark apart from in Defold, where it appears much lighter.

Ah, I misunderstood!

Seems related to this (although we didn’t create a ticket for this afaik): [Solved] Issue rendering tilemap

I created a ticket for this specific issue: DEF-2093