[SDL] scaling images

Mattias Engdegård f91-men at nada.kth.se
Wed Jun 21 13:41:01 PDT 2000


>ok, i'm finding there's no SDL support for scaling surfaces.

Try SDL_SoftStretch()

>i'm needing this, and i figure if i'm gonna do it, i might as
>well do it right and make it work for all SDL.

>pretty basic, i would include a set of standard filters
>(closest, linear, cubic, and maybe some others...)

SDL_SoftStretch only seems to use nearest-neighbour interpolation, and
I agree that it should be a parameter. I don't know what other methods
of interpolation (besides that, bilinear, and bicubic) you had in mind.

>* i'm pretty sure directdraw supports hardware scaling
>how is this best handled? adding a "hardware" filter
>type would be my best guess

Can't sdl decide to use hardware acceleration directly if it is faster?





More information about the SDL mailing list