I want to load a JPEG image, resize it and save it back. I’m using SDL_image. I also found SDL_resize, but the link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a tool.
Thanks in advance
Phuoc
/_/_/_/_/_/_ www.huaonline.com
My Homepage is my Castle__________________________________________________________________________________
Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for free at PLUS7. www.tv.yahoo.com.au/plus7
I want to load a JPEG image, resize it and save it back. I’m using
SDL_image. I also found SDL_resize, but the link to the ZIP file is
broken.
What can I do?
Not much, at least with SDL_image. SDL_image has only functions for
reading images, not for writing images. SDL has SDL_SaveBMP(), but it’s hmm
just for BMPs. You will need to use another library for writing JPEGs.On Mon, 25 Jan 2010 02:59:34 -0800 (PST), Phuoc Can Hua wrote:
SDL_gfx has a surface resizer which also supports anti-aliasing. Maybe
it helps with that part of your project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx, double zoomy,
int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created ‘dst’ surface.
‘zoomx’ and ‘zoomy’ are scaling factors for width and height. If
’smooth’ is 1, then the destination 32bit surface is anti-aliased. If
the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a
32bit RGBA format on the fly. Smoothing (interpolation) flags work only
on 32bit surfaces:
–Andreas
Phuoc Can Hua wrote:> I want to load a JPEG image, resize it and save it back. I’m using SDL_image. I also found SDL_resize, but the link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a tool.
/_/_/_/_/_/_ www.huaonline.com
My Homepage is my Castle— On Tue, 26/1/10, Andreas Schiffler wrote:
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Received: Tuesday, 26 January, 2010, 4:50 PM
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.
? ?
???__________________________________________________________________________________
Yahoo!7: Catch-up on your favourite Channel 7 TV shows
easily, legally, and for free at PLUS7. www.tv.yahoo.com.au/plus7
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Received: Tuesday, 26 January, 2010, 4:50 PM
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.
thanks, I will check this out.
_/\__/\__/\__/\__/\__/\_
www.huaonline.com <http://www.huaonline.com>
My Homepage is my Castle
--- On Tue, 26/1/10, Andreas Schiffler <@Andreas_Schiffler <mailto:@Andreas_Schiffler>> wrote:
> From: Andreas Schiffler <@Andreas_Schiffler
<mailto:@Andreas_Schiffler>>
> Subject: Re: [SDL] How to resize and save a JPEG image?
> To: home at huaonline.com <mailto:home at huaonline.com>, "SDL
Development List" <sdl at lists.libsdl.org <mailto:sdl at lists.libsdl.org>>
> Received: Tuesday, 26 January, 2010, 4:50 PM
>
> SDL_gfx has a surface resizer which also supports
> anti-aliasing. Maybe it helps with that part of your
> project.
>
> SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
> double zoomy, int smooth);
> Zooms a 32bit or 8bit 'src' surface to newly created 'dst'
> surface. 'zoomx' and 'zoomy' are scaling factors for width
> and height. If 'smooth' is 1, then the destination 32bit
> surface is anti-aliased. If the surface is not 8bit or 32bit
> RGBA/ABGR it will be converted into a 32bit RGBA format on
> the fly. Smoothing (interpolation) flags work only on 32bit
> surfaces:
>
> --Andreas
>
> Phuoc Can Hua wrote:
> > I want to load a JPEG image, resize it and save it
> back. I'm using SDL_image. I also found SDL_resize, but the
> link to the ZIP file is broken.
> > What can I do?
> >
> > P.S. I'm looking for a programing solution, not a
> tool.
> >
> > Thanks in advance
> > Phuoc
> >
> > _/\__/\__/\__/\__/\__/\_
> > www.huaonline.com <http://www.huaonline.com>
> > My Homepage is my Castle
> >
> >
> >
>
__________________________________________________________________________________
> > Yahoo!7: Catch-up on your favourite Channel 7 TV shows
> easily, legally, and for free at PLUS7.
> www.tv.yahoo.com.au/plus7 <http://www.tv.yahoo.com.au/plus7>
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> >
__________________________________________________________________________________
See what's on at the movies in your area. Find out now:
http://au.movies.yahoo.com/session-times/
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Phuoc,
I am the writer of the SDL_resize lib that’s got the broken link. I’d be
happy to send it to you via email. It’s does what you want in terms of
resizing your image, with very high quality (uses a lanczos3 filter, which
is definitely superior to the rotozoom filter). I can’t help you out on the
saving of the image, beyond the basic BMP save function (SDL_SaveBMP()),
though.
I’ve really got to find a new spot to keep that lib hosted… Any good
suggestions out there? Free webhosting solutions, that is
-Dave
p.s. I’ll send it to the address I see here (@yahoo.com.au)--------------------------------------------------
From: phuoccanhua@yahoo.com.au (Phuoc Can Hua)
Sent: Tuesday, January 26, 2010 4:12 AM
To: “SDL Development List”
Subject: Re: [SDL] How to resize and save a JPEG image?
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Received: Tuesday, 26 January, 2010, 4:50 PM
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.
Phuoc,
I am the writer of the SDL_resize lib that’s got the broken link. I’d be
happy to send it to you via email. It’s does what you want in terms of
resizing your image, with very high quality (uses a lanczos3 filter, which
is definitely superior to the rotozoom filter). I can’t help you out on the
saving of the image, beyond the basic BMP save function (SDL_SaveBMP()),
though.
I’ve really got to find a new spot to keep that lib hosted… Any good
suggestions out there? Free webhosting solutions, that is
-Dave
p.s. I’ll send it to the address I see here (@Jeremiah)
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.
SDL mailing list
SDL at lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
On Thu, Jan 28, 2010 at 1:13 AM, David Olsen wrote:
From: “Phuoc Can Hua”
Sent: Tuesday, January 26, 2010 4:12 AM
To: “SDL Development List”
Subject: Re: [SDL] How to resize and save a JPEG image?
— On Tue, 26/1/10, Andreas Schiffler wrote:
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Dave, I’m happy to host SDL libraries on libsdl.org. Just send me an
archive of the web drop and I’ll put it in www.libsdl.org/projects/SDL_resizeOn Wed, Jan 27, 2010 at 10:13 PM, David Olsen wrote:
Phuoc,
I am the writer of the SDL_resize lib that’s got the broken link. I’d be
happy to send it to you via email. It’s does what you want in terms of
resizing your image, with very high quality (uses a lanczos3 filter, which
is definitely superior to the rotozoom filter). I can’t help you out on the
saving of the image, beyond the basic BMP save function (SDL_SaveBMP()),
though.
I’ve really got to find a new spot to keep that lib hosted… Any good
suggestions out there? Free webhosting solutions, that is
-Dave
p.s. I’ll send it to the address I see here (@yahoo.com.au)
From: “Phuoc Can Hua”
Sent: Tuesday, January 26, 2010 4:12 AM
To: “SDL Development List”
Subject: Re: [SDL] How to resize and save a JPEG image?
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Received: Tuesday, 26 January, 2010, 4:50 PM
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.
Sam, that’s really generous of you! If I hadn’t just completed a sourceforge
project page for the lib a few minutes ago, I’d take you up on it.
I’ve updated the lib information on libsdl.org to reflect the new location
of the project.
-Dave--------------------------------------------------
From: slouken@libsdl.org (slouken)
Sent: Thursday, January 28, 2010 5:04 PM
To: “SDL Development List”
Subject: Re: [SDL] How to resize and save a JPEG image?
On Wed, Jan 27, 2010 at 10:13 PM, David Olsen <@David_Olsen> wrote:
Phuoc,
I am the writer of the SDL_resize lib that’s got the broken link. I’d be
happy to send it to you via email. It’s does what you want in terms of
resizing your image, with very high quality (uses a lanczos3 filter,
which
is definitely superior to the rotozoom filter). I can’t help you out on
the
saving of the image, beyond the basic BMP save function (SDL_SaveBMP()),
though.
I’ve really got to find a new spot to keep that lib hosted… Any good
suggestions out there? Free webhosting solutions, that is
-Dave
p.s. I’ll send it to the address I see here (@yahoo.com.au)
From: “Phuoc Can Hua”
Sent: Tuesday, January 26, 2010 4:12 AM
To: “SDL Development List”
Subject: Re: [SDL] How to resize and save a JPEG image?
From: Andreas Schiffler
Subject: Re: [SDL] How to resize and save a JPEG image?
To: home at huaonline.com, “SDL Development List”
Received: Tuesday, 26 January, 2010, 4:50 PM
SDL_gfx has a surface resizer which also supports
anti-aliasing. Maybe it helps with that part of your
project.
SDL_Surface * zoomSurface (SDL_Surface *src, double zoomx,
double zoomy, int smooth);
Zooms a 32bit or 8bit ‘src’ surface to newly created 'dst’
surface. ‘zoomx’ and ‘zoomy’ are scaling factors for width
and height. If ‘smooth’ is 1, then the destination 32bit
surface is anti-aliased. If the surface is not 8bit or 32bit
RGBA/ABGR it will be converted into a 32bit RGBA format on
the fly. Smoothing (interpolation) flags work only on 32bit
surfaces:
–Andreas
Phuoc Can Hua wrote:
I want to load a JPEG image, resize it and save it
back. I’m using SDL_image. I also found SDL_resize, but the
link to the ZIP file is broken.
What can I do?
P.S. I’m looking for a programing solution, not a
tool.