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

Add PNG support to SDL surfaces #20

Closed
DaVince opened this issue Jun 6, 2010 · 3 comments
Closed

Add PNG support to SDL surfaces #20

DaVince opened this issue Jun 6, 2010 · 3 comments

Comments

@DaVince
Copy link

DaVince commented Jun 6, 2010

Self-explanatory. If not too much effort, the PNG library could be tied in with the SDL surfaces to make said surface support more useful.

@tung
Copy link
Owner

tung commented Jun 6, 2010

Looks doable if I implement SDL_CreateRGBSurfaceFrom. Despite the name, the man page says that it supports the alpha channel too.

@tung
Copy link
Owner

tung commented Jun 6, 2010

Add CreateRGBSurfaceFrom to SDL lib. Closed by 73c60ba.

  • See test/blitpng.lua for an example of how to use it.

@DaVince
Copy link
Author

DaVince commented Jun 6, 2010

Works great, even when I change the background of the smiley to transparency. Two blitted smileys will overlap properly, keeping the transparency in a ccount.

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

No branches or pull requests

2 participants