Enhancements for SDL_PremultiplyAlpha()

The function can now convert between pixels of different formats, and takes a parameter to control whether the premultiplication is done in sRGB or linear space.

Also added SDL_PremultiplySurfaceAlpha(), which can premultiply the pixels of a surface in-place.
This commit is contained in:
Sam Lantinga
2024-07-17 12:50:56 -07:00
parent b99ea1ff75
commit 334962b056
7 changed files with 210 additions and 31 deletions

View File

@@ -610,6 +610,7 @@ SDL3_0.0.0 {
SDL_PollEvent;
SDL_PostSemaphore;
SDL_PremultiplyAlpha;
SDL_PremultiplySurfaceAlpha;
SDL_PumpEvents;
SDL_PushEvent;
SDL_PutAudioStreamData;