The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Under SDL-2, how to set alpha degree for SDL_Surface?
Nemo3773


Joined: 05 Jun 2015
Posts: 6
SDL_SetSurfaceAlphaMod can set alpha degree, but it seems effective only for image render, not the image itself.

I need to change the alpha degree for image and save the image to disk.

Thanks Very Happy
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
You could always render to a new surface (after setting the alpha value) and then save it.
tanks a lot
Nemo3773


Joined: 05 Jun 2015
Posts: 6
Very Happy