Help SDL_Surface

Hi guys,
I have a problem!
I’m making a program which divides an image in tiles and saves this tiles
into an SDL_Surface array.--------------------------
SDL_Surface **tiles;

img_w = bitmap->w / 32;
img_h = bitmap->h / 32;
n_square = img_w * img_h;

tiles = calloc( n_square, sizeof(SDL_Surface*) );

After that I delete the equal tiles and I keep the remaining tiles.

Then I would like to save them into a new bitmap.
How can I do it?

do you mean you want to delete the tiles that are
pixel by pixel equal ? So it would be possible to
compose the original picture by those remaining tiles

If you want to store those tiles in bmp files, use
SDL_SaveBMP to write each of them into a seperate bmp
file. To store them all into one bmp file, you have to
create another surface and blit all tiles onto it,
then use SDL_SaveBMP to create one great bmp file.

Hope i could help you a bit :),

Gesendet von Yahoo! Mail -
Bis zu 100 MB Speicher bei