Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Paletted PNG rendered incorrectly under Win

This thread is locked; no one can reply to it. rss feed Print
Paletted PNG rendered incorrectly under Win
Vi_112
Member #15,539
March 2014

Hi!

I played a bit with palettes PNG and found a strange problem.
When everything works fine under OS X, Windows version produces strange glitches - screenshot attached. Also attached a palettes version of mysha that I used.

Did anybody ever encounter this? Any guess on how to fix?

Allegro 5.1.9, both DX and OGL - so it is somewhere in the "read" part. LibPng?

Thanks,
Vladimir

Chris Katko
Member #1,881
January 2002
avatar

For future reference, you can link directly to your attached pictures in the forum!

Just put the address in [square brackets].

{"name":"609348","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/c\/3c92532befd312292ade58b83a3f33e6.png","w":635,"h":504,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/c\/3c92532befd312292ade58b83a3f33e6"}609348

{"name":"609349","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/f\/0f1d43c4e1829e141ffc1106af5dfc37.png","w":256,"h":256,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/f\/0f1d43c4e1829e141ffc1106af5dfc37"}609349

Also, what color depth are you running? Sometimes different drivers force different depths, so a Linux machine is 24-bit and a Windows is 32-bit color (that happened to me.) Make sure you're not doing any accidental color conversion by making sure Allegro is set to the desktop depth.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Vi_112
Member #15,539
March 2014

I set no options except for ALLEGRO_DEPTH_SIZE, but removing it does nothing.

Actually, nothing I tried in display creation affects the effect.

I really suspect this is something about loading PNG, not displaying them...

SiegeLord
Member #7,827
October 2006
avatar

Yeah, the code that loaded the pngs with a palette and transparency was completely broken. This is now fixed in 49b7f67208c7a544e0e4276e17a09459bf4687c0.

There really is no good workabout, aside from not using pngs with a palette and transparency.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Vi_112
Member #15,539
March 2014

Thanks, that helped obviously :)

I just did not know where to look at :)

Go to: