Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Image Overlays are mutilated beyond recognition (5.1.1 Problems with transparency in palette PNGs)
New Topic New Poll Post Reply
Poster Message
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged

File: SweetDreamsImageOverlay.png (33.8 KB)
Downloaded 150 times.
License: Public Domain
icon Image Overlays are mutilated beyond recognition (+2)  


This is a screenshot of exactly the same hold from two different versions of DROD, 5.1 being the Steam version and 5.1.1 the latest alpha (And, coincidentally, I have the same result when building the project on my own).

My guess is that either the update of SDL from 2.0.5 to 2.0.12 broke it or something changed in the PNG library or, I dunno, somehow transparency is just not loaded.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 09-26-2020 10:06 PM]
09-26-2020 at 09:15 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged

File: test.hold (1.4 KB)
Downloaded 40 times.
License: Public Domain
icon Re: Image Overlays are mutilated beyond recognition (+1)  
Attaching the test hold

____________________________
My website | Facebook | Twitter
09-26-2020 at 09:15 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Image Overlays are mutilated beyond recognition (+2)  
It seems like there was an issue relating to transparency in PNGs introduced in SDL 2.0.10 and it was fixed in 2.0.12, perhaps it's related: https://discourse.libsdl.org/t/will-be-solved-in-2-0-11-png-w-transparency-breaks-in-sdl-2-0-10-but-works-in-sdl-2-0-9/26501/9

I'll make some tests with different PNGs to see how that affects things.

____________________________
My website | Facebook | Twitter
09-26-2020 at 09:22 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Image Overlays are mutilated beyond recognition (+4)  
I can confirm 32-bit PNGs with alpha channel (at least the few I checked) DO NOT have this problem. It only has an issue with ones that use a palette with transparent color. I'll see about fixing this issue.

____________________________
My website | Facebook | Twitter
09-26-2020 at 09:25 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Image Overlays are mutilated beyond recognition (+5)  
Here's a PR fixing the problem - https://github.com/CaravelGames/drod/pull/58

____________________________
My website | Facebook | Twitter
09-26-2020 at 10:11 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Image Overlays are mutilated beyond recognition (+2)  
There were a few more problems I've discovered with palette-based PNGs:

1. Having an image overlay during the death fade out animation would crash the game (happened in 5.1 and 5.1.1 before my fix)
2. Changing opacity of the image overlay would make it behave erratically (happened in 5.1.1 before my fix)

I feel like the original handling might've been implemented as a workaround for some bug or for making it faster to import the palette-based images.

Note for testers: when new alpha build is made please make sure to check holds which use image overlays. Notable ones I can think of are:

Click here to view the secret text


Also if there are holds which use custom characters and portraits a lot (TSS again will be a candidate) it'd be a good idea to check them too.

____________________________
My website | Facebook | Twitter
09-28-2020 at 07:55 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Image Overlays are mutilated beyond recognition (+1)  
In 5.1.1.alpha.2020-10-16 I had a play around with TSS and DROD Touch, and image overlays and character portraits seemed fine as far as I can tell.

[Last edited by kieranmillar at 10-17-2020 02:15 PM]
10-17-2020 at 02:02 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Image Overlays are mutilated beyond recognition (5.1.1 Problems with transparency in palette PNGs)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.