[SDL] Resize image in SDL_Surface

Riccardo t1t0 at tiscali.it
Thu Jan 23 18:40:01 PST 2003

    Message: 6
    Date: Thu, 23 Jan 2003 14:24:17 -0500
    From: Glenn Maynard <g_sdl at zewt.org>
    To: sdl at libsdl.org
    Subject: Re: [SDL] Resize image in SDL_Surface
    Reply-To: sdl at libsdl.org
    On Thu, Jan 23, 2003 at 01:10:51PM -0600, Corona688 wrote:
    > The basic SDL API can't do it;  it just loads, converts, and blits
    > surfaces.  There *is* an add-on library for SDL that can, however.  :)
    > http://www.ferzkopp.net/Software/SDL_gfx-2.0/  includes image
    > stretching, among afew other things.  Just be aware that rotozoom
    > doesn't stretch the original image - it produces a new, stretched image
    > in memory that'll have to be freed once you're done with it by
    > SDL_FreeSurface().
    Also be aware that it's very low-quality; unacceptably low for some size
    ratios and uses.  (It's written for speed, not quality.)
    I've modified the RGBA zoom to do an actual 2:1 sample.  It's slower, but
    looks better as long as the size ratio isn't worse than 2:1 or 1:2.
I must resize one text image, a pair of times for all the program
I think that will work well.

    I still need to add options to handle clamp vs. wrap filtering.
    I'm still hoping someone's written a triangle filter resize ...
    Glenn Maynard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030123/f54c352c/attachment-0008.pgp>

More information about the SDL mailing list