Original Post
🔒 Locked
SDL image help?
Advertisement
Quote:
Original post by Peregrin Quote:
Original post by ScottC
Say i want to remove 0,0,255 color from the image completely, so I make area's I don't want to show blue, how can I do that?
SDL_SetColorKey.
Here's an example of your code:
// Already loaded before hand and optimized with SDL_DisplayFormatSDL_Surface* myLoadedImage;// Now we set the color key by mapping the color we wantSDL_SetColorKey( myLoadedImage, SDL_SRCCOLORKEY, SDL_MapRGB(myLoadedImage->format, 0, 0, 255 ) );That's all there is to it!
Quote:
Original post by ScottC
Say i want to remove 0,0,255 color from the image completely, so I make area's I don't want to show blue, how can I do that?
I have a tutorial that covers that.
Lazy Foo's SDL tutorials
[Edited by - Lazy Foo on August 9, 2007 7:27:13 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement