Archived

This topic is now archived and is closed to further replies.

programering

painting SDL_Surfaces

Recommended Posts

I have an idea of painting SDL_Surfaces in my game (just when it starts up). Cos I want to have sprites/images/pictures in many different colors. First I will have to copy the orginal SDL_Surface with SDL_ConvertSurface(...) I think. Then I will have to start a for(...)loop getting the pixel data with get_pixel(...) and if the pixel contains a specific color then it will be replaced with a color I want instead and setting that pixel color with put_pixel(...) Anton Karlsson

Share this post


Link to post
Share on other sites
Sorry, I meant a program like Paint Shop Pro or Photoshop. You can select all the pixels of a certain colour, change the colour, and then save the image under a different filename.



[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites