Image resizing using SDL,
Members - Reputation: 133
Posted 19 September 2007 - 06:12 PM
Members - Reputation: 1113
Posted 19 September 2007 - 06:40 PM
or better yet do it before runtime using Irfan View. Doing it at runtime just waste CPU power. If you need constant scaling, you're better off using hardware accelerated OpenGL.
Learn to make games with my SDL 2 Tutorials
Members - Reputation: 328
Posted 25 September 2007 - 10:43 AM
1. If you want to resize it to a specific size and then use it like that in many places: use SDL_rotozoom to pre-process them and store them in their altered state as new surfaces. Then use those to blit the resized version.
2. If you want to resize it at runtime to an arbitrary size: then SDL_rotozoom is most likely too slow for you and you would have to look into using OpenGL instead. OpenGL does this without missing a step.
But even if you want to do it at runtime, then try rotozoom first and check if you can manage with the loss of speed. Maybe it won't bother you.