Resize an Image

how can i resize an image???

i have an 32x32 image and I wanna display this imagem at 16x16…

tks

You’ll need to do it manually, by examining the pixels in the surface
and then skipping (or combining, if you don’t want it to look ugly) pixels.

Look for the ‘getpixel()’ and ‘putpixel()’ example code in the tutorials.

Or, you can use an add-on library that does this for you.
One that comes to mind (though I’m not sure if it’s deprecated, or not)
is SDL_rotozoom. (I’ve never personally used it.)

Search in the SDL website “Libraries” download page.

Good luck!

-bill!On Tue, Sep 16, 2003 at 03:58:08PM -0300, Ricardo Ferrari (SPO-LAB) wrote:

how can i resize an image???

i have an 32x32 image and I wanna display this imagem at 16x16…


bill at newbreedsoftware.com Got kids? Get Tux Paint!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/tuxpaint/

Hello Ricardo, (where are you in Brazil?)

Try one library, SDL Graphics (I think), it allows zoomin, rotating and scalling images on software surface, with support for MMX and 3D Now on the latest version, if I’m not wrong.

You can search for it at the SDL libraries page.

Paulo>

From: “Ricardo Ferrari (SPO-LAB)”
Date: Tue, 16 Sep 2003 15:58:08 -0300
To: sdl at libsdl.org
Subject: [SDL] Resize an Image

how can i resize an image???

i have an 32x32 image and I wanna display this imagem at 16x16…

tks