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” ArchboldOn 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.
Thankyou
Has anyone written or know how to write an algorithm to resize an
SDL_Surface.
I have some (not very good or fast) resize code in a graphics library
I wrote long ago for doing graphics inside C CGI’s. (It was mainly for fun.
The code is pretty crappy, so please don’t laugh. It was years ago )
http://www.sonic.net/~nbs/unix/www/cgi-draw/
You MIGHT find some of it usable.
Lemme guess… scaling sprites, huh?
-bill!
The SGE extentions library has these routines that you might be interested
in (from the SGE documentation page):
You can find the library at:
http://www.etek.chalmers.se/~e8cal1/sge/index.html
DAMN! How did I MISS this!?!?!?
-bill!
I’m currently working on an medical image viewer for Linux & NT
which supports realtime (that means extremly fast) image resizing.
Images can be resized blocky (fast) an smooth (slow).
Currently i only support grayscale images with 8 and 16 bit
depth (but it’s not so hard to implement color).
Is think a can extract it from my code and provide a lib!
Please mail me that i can see how many people are interested
in this. (Sorry my time is quite limited)
Alex> ----- Original Message -----
From: mef275@mail.usask.ca (Michael Fletcher)
Newsgroups: loki.open-source.sdl
To:
Sent: Friday, January 14, 2000 12:05 AM
Subject: [SDL] Resizing Images
Has anyone written or know how to write an algorithm to resize an
SDL_Surface.
Thankyou
Alexander Pipelka wrote:
I’m currently working on an medical image viewer for Linux & NT
which supports realtime (that means extremly fast) image resizing.
Images can be resized blocky (fast) an smooth (slow).
Currently i only support grayscale images with 8 and 16 bit
depth (but it’s not so hard to implement color).
Is think a can extract it from my code and provide a lib!
Please mail me that i can see how many people are interested
in this. (Sorry my time is quite limited)
Alex
Newsgroups: loki.open-source.sdl
Has anyone written or know how to write an algorithm to resize an
SDL_Surface.
Thankyou
YES!
I’m very interested !
Thanks!
Eduardo.> ----- Original Message -----
From: Michael Fletcher
To:
Sent: Friday, January 14, 2000 12:05 AM
Subject: [SDL] Resizing Images
Alexander Pipelka wrote:
I’m currently working on an medical image viewer for Linux & NT
which supports realtime (that means extremly fast) image resizing.
Images can be resized blocky (fast) an smooth (slow).
Currently i only support grayscale images with 8 and 16 bit
depth (but it’s not so hard to implement color).
Is think a can extract it from my code and provide a lib!
Please mail me that i can see how many people are interested
in this. (Sorry my time is quite limited)
Alex
Newsgroups: loki.open-source.sdl
Has anyone written or know how to write an algorithm to resize an
SDL_Surface.
Thankyou
Yes!
I would be VERY interested!
Eduardo.> ----- Original Message -----
From: Michael Fletcher
To:
Sent: Friday, January 14, 2000 12:05 AM
Subject: [SDL] Resizing Images