[SDL] Image resizing

David Olsen jolynsbass at gmail.com
Sat Dec 1 09:11:27 PST 2007

You can try the SDL_resize library. It's not suitable for real-time 
resizing(during the game) but works well for pre-rendering graphics before 
the game starts(loading screen). It uses some better high-quality resizing 
algorhythms than SDL_gfx, so the results are pretty nice, imo. Just make 
sure you read the header for instructions on how to use it correctly.
p.s. it can also resize your 80x40 sprites to be 64x64, if you really want 
to mess up the aspect ratio of the sprites, or you can simply scale it based 
on percentages, while maintaining aspect ratio - your choice.

----- Original Message ----- 
From: "Michael Sullivan" <michael at espersunited.com>
To: "A list for developers using the SDL library. (includes SDL-announce)" 
<sdl at lists.libsdl.org>
Sent: Saturday, December 01, 2007 11:03 AM
Subject: Re: [SDL] Image resizing

> On Sat, 2007-12-01 at 16:57 +0000, Brian wrote:
>> SDL tries not to add functionality which can  be implemented in terms
>> of SDL itself. There is an add-on library, SDL_gfx, that has support
>> for image scaling (and rotation). Check it out, it is available in the
>> libraries section of libsdl.org.
>> On 01/12/2007, Michael Sullivan <michael at espersunited.com> wrote:
>> > Is it true that SDL can't stretch images?  My ally sprites are 64x64,
>> > and my enemy sprites are 80x40.  I'd like them to appear more
>> > proportional in comparison with the allies...
>> >
>> > _______________________________________________
>> > SDL mailing list
>> > SDL at lists.libsdl.org
>> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> Is it the same SDL_gfx that allows one to draw primitives?  If so, then
> I already have that.  Thank you for your advice...
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org 

More information about the SDL mailing list