[SDL] Resizing Images

Archbold, David W. DWArchbold at West.com
Thu Jan 13 14:39:53 PST 2000


On Thursday, January 13, 2000 5:06 PM, Michael Fletcher
[SMTP:mef275 at mail.usask.ca] wrote:
> Has anyone written or know how to write an algorithm to resize an
> SDL_Surface.

The SGE extentions library has these routines that you might be interested
in (from the SGE documentation page):

SDL_Surface *sge_rotate_scaled_surface(SDL_Surface *src, int angle, float
scale, Uint32 bcol)
Returns a rotated and scaled copy of src. Angle is the rotation angle in
degrees. Scale is the scaling value, 1.0 is the normal size. Bcol
is the background color.

I believe that if you give it an angle of 0 it would simply leave the image
as-is
(for some reason, I thought that SGE also had just a "scale" routine w/o the
rotation.  Maybe Anders combined the two?  I'd check the docs)


You can find the library at:
http://www.etek.chalmers.se/~e8cal1/sge/index.html

(or check the 'libraries' link on the main SDL page for others)

cheers,
Dave "PenguinDude" Archbold




More information about the SDL mailing list