An improved (faster/higher quality) image resize library

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for pre-rendering images of various sizes, etc.
I have recently rewritten the resizing code from scratch to take direct advantage of a good Lanczos algorithm from wikipedia. It’s speed is 3x-5x faster than the current library, and the quality is better, too. Only thing is, it’s only C++.
Is this the sort of thing that people would like to have available, or is it really only useful if there is a C version?
If I post the code, I bet someone could whip up a C version pretty easily - I just don’t have the C experience to do it.
Thoughts/opinions?
-Dave

David Olsen wrote:

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for
pre-rendering images of various sizes, etc.
I have recently rewritten the resizing code from scratch to take direct
advantage of a good Lanczos algorithm from wikipedia. It’s speed is
3x-5x faster than the current library, and the quality is better, too.
Only thing is, it’s only C++.
Is this the sort of thing that people would like to have available, or
is it really only useful if there is a C version?
If I post the code, I bet someone could whip up a C version pretty
easily - I just don’t have the C experience to do it.
Thoughts/opinions?
-Dave



SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Sounds like good stuff. I’d be willing to work on a c version.
CWC

Post the code somewhere we can download it. I’m sure there are a lot of people
who’d take a stab at it.

JeffOn Mon June 2 2008 20:07, David Olsen wrote:

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for
pre-rendering images of various sizes, etc. I have recently rewritten the
resizing code from scratch to take direct advantage of a good Lanczos
algorithm from wikipedia. It’s speed is 3x-5x faster than the current
library, and the quality is better, too. Only thing is, it’s only C++. Is
this the sort of thing that people would like to have available, or is it
really only useful if there is a C version? If I post the code, I bet
someone could whip up a C version pretty easily - I just don’t have the C
experience to do it.

has this been tested with the current version of sdl ? if so what
platforms ? i know sdl with x11 is slower with larger images, i thought
it was due to bandwidth from memory to graphics.

mattOn Mon, 2 Jun 2008, David Olsen wrote:

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for pre-rendering images of various sizes, etc.
I have recently rewritten the resizing code from scratch to take direct advantage of a good Lanczos algorithm from wikipedia. It’s speed is 3x-5x faster than the current library, and the quality is better, too. Only thing is, it’s only C++.
Is this the sort of thing that people would like to have available, or is it really only useful if there is a C version?
If I post the code, I bet someone could whip up a C version pretty easily - I just don’t have the C experience to do it.
Thoughts/opinions?
-Dave

It has been tested with SDL 1.2.13 and only on Windows - though, it’s just
plain C++ and SDL, so I can’t imagine why it wouldn’t compile on other OS’s
just fine. All operations are performed in memory, with quite a bit of
direct pixel manipulation, to avoid SDL fuction call overhead. It may be
fast enough now for real time use with small images, but it’s still mostly
just for resizing the graphics before the game begins.

I’ll upload my code, and post a link to it on this list here, and perhaps
some of you could test it on other OS’s (or is that OSes?) Okay, I’ll snap
to it.
-Dave> ----- Original Message -----

From: mattmatteh@mac.com (matt hull)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, June 02, 2008 11:16 PM
Subject: Re: [SDL] An improved (faster/higher quality) image resize library

has this been tested with the current version of sdl ? if so what
platforms ? i know sdl with x11 is slower with larger images, i thought
it was due to bandwidth from memory to graphics.

matt

On Mon, 2 Jun 2008, David Olsen wrote:

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for
pre-rendering images of various sizes, etc.
I have recently rewritten the resizing code from scratch to take direct
advantage of a good Lanczos algorithm from wikipedia. It’s speed is 3x-5x
faster than the current library, and the quality is better, too. Only
thing is, it’s only C++.
Is this the sort of thing that people would like to have available, or is
it really only useful if there is a C version?
If I post the code, I bet someone could whip up a C version pretty
easily - I just don’t have the C experience to do it.
Thoughts/opinions?
-Dave


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hi,

there is a new smooth scale routine in pygame 1.8+. It has a mmx
implementation, and C fallback.

static void scalesmooth(SDL_Surface *src, SDL_Surface *dst)

http://www.seul.org/viewcvs/viewcvs.cgi/trunk/src/transform.c?rev=1238&root=PyGame&sortby=date&view=markupOn Wed, Jun 4, 2008 at 8:23 AM, David Olsen wrote:

It has been tested with SDL 1.2.13 and only on Windows - though, it’s just
plain C++ and SDL, so I can’t imagine why it wouldn’t compile on other OS’s
just fine. All operations are performed in memory, with quite a bit of
direct pixel manipulation, to avoid SDL fuction call overhead. It may be
fast enough now for real time use with small images, but it’s still mostly
just for resizing the graphics before the game begins.

I’ll upload my code, and post a link to it on this list here, and perhaps
some of you could test it on other OS’s (or is that OSes?) Okay, I’ll snap
to it.
-Dave

----- Original Message ----- From:
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, June 02, 2008 11:16 PM
Subject: Re: [SDL] An improved (faster/higher quality) image resize library

has this been tested with the current version of sdl ? if so what
platforms ? i know sdl with x11 is slower with larger images, i thought it
was due to bandwidth from memory to graphics.

matt

On Mon, 2 Jun 2008, David Olsen wrote:

Hi all,
I’m the one who “made” the SDL_Resize package, which is good for
pre-rendering images of various sizes, etc.
I have recently rewritten the resizing code from scratch to take direct
advantage of a good Lanczos algorithm from wikipedia. It’s speed is 3x-5x
faster than the current library, and the quality is better, too. Only thing
is, it’s only C++.
Is this the sort of thing that people would like to have available, or is
it really only useful if there is a C version?
If I post the code, I bet someone could whip up a C version pretty easily

  • I just don’t have the C experience to do it.
    Thoughts/opinions?
    -Dave

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

— David Olsen wrote:

I’ll upload my code, and post a link to it on this list here, and
perhaps
some of you could test it on other OS’s (or is that OSes?) Okay, I’ll
snap
to it.
-Dave

Anything happened with this, or am I just being dense?

Thanks for the elbow nudge, Paul!

Here is a link to the c++ source:
http://members.cox.net/dolsen6/resize++.zip - high quality image resizing
(way better than bilinear, and even bicubic), slow but very good results.
(Not super slow, just not fast!)
I’d really appreciate any input on this image resizing library. If anyone
wants to construct C code out of it(no doubt a relatively simple task for
someone good with C) I’d be happy to host it as part of the package, with
credit given to the author(s) of course.
If it’s deemed adequate I’ll post it to the SDL page, in the libraries
section.
Thanks!
-Dave> ----- Original Message -----

From: odubtaig@yahoo.co.uk (Paul Duffy)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Tuesday, June 10, 2008 3:31 PM
Subject: Re: [SDL] An improved (faster/higher quality) image resize library

— David Olsen <@David_Olsen> wrote:

I’ll upload my code, and post a link to it on this list here, and
perhaps
some of you could test it on other OS’s (or is that OSes?) Okay, I’ll
snap
to it.
-Dave

Anything happened with this, or am I just being dense?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org