Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain transparent backgrounds render as blue since SDL_image 2.8.3 on Mac OS X #494

Closed
tobbi opened this issue Dec 26, 2024 · 8 comments
Closed

Comments

@tobbi
Copy link

tobbi commented Dec 26, 2024

I'm sorry for this being rather vague because I'm not sure of the actual cause.
I've installed SDL_image 2.8.3 using Homebrew on my MacOS X 12.7.6 machine and I'm linking SuperTux against it.

Certain previously transparent images now render with a blue background:

2024-12-26.14-41-11.mp4

I then disabled the homebrew formula and compiled 2.8.2 manually and the issue is gone:

2024-12-26.19-21-40.mp4

If there's anything more you need, just tell me.

@slouken
Copy link
Collaborator

slouken commented Dec 26, 2024

Do you get the issue if you build 2.8.3 manually? If not, what are the configure options being used by the homebrew formula?

@tobbi
Copy link
Author

tobbi commented Dec 26, 2024

Do you get the issue if you build 2.8.3 manually? If not, what are the configure options being used by the homebrew formula?

Apparently, linking against a self-built 2.8.3 worked just fine and doesn't show the issue. Here are the homebrew configure flags: https://github.com/Homebrew/homebrew-core/blob/dba938d9df5b2e1fe399ef345d64cfa3df0c1f79/Formula/s/sdl2_image.rb#L43C1-L50C51

@slouken
Copy link
Collaborator

slouken commented Dec 26, 2024

Can you link one of the images that is failing?

@slouken
Copy link
Collaborator

slouken commented Dec 26, 2024

Can you reproduce it if you build with the same configure options that homebrew uses, and then run showimage on that image?

@sezero
Copy link
Contributor

sezero commented Dec 26, 2024

Reproduces on linux with --disable-stb-image, thus using libpng, in both release-2.8.x and SDL2 branches. Should possibly reproduce in SDL3 (main) branch too.

Commit 0000fb0 (which was cherry-picked to release-2.8.x too) seems to be the culprit.

@tobbi
Copy link
Author

tobbi commented Dec 26, 2024

Can confirm that by adding the flags from the homebrew formula, the bug re-appears.

slouken added a commit that referenced this issue Dec 26, 2024
Fixes #494

(cherry picked from commit ae0b7c4)
slouken added a commit that referenced this issue Dec 26, 2024
Fixes #494

(cherry picked from commit ae0b7c4)
(cherry picked from commit df9552d)
@slouken
Copy link
Collaborator

slouken commented Dec 26, 2024

Fixed! Thanks for the help tracking this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants