load multiple images and places them in specific coordination in a saving file

This is a discussion on load multiple images and places them in specific coordination in a saving file within the C++ Programming forums, part of the General Programming Boards category; as in the title above, i need to load multiple images files with same sizes and places them in their ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    74

    load multiple images and places them in specific coordination in a saving file

    as in the title above, i need to load multiple images files with same sizes and places them in their specific coordination in a result saved image file, how to do that? what classes should i use? thanks!

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,409
    you could do it by learning SDL library,
    create a target SDL_Surface* to collect all the images together in one place
    then create another surface and use SDL_LoadBMP() to load the individual images,
    then create an SDL_Rect to contain the target position and width/height of each image
    then use SDL_BlitSurface() to copy them in memory to the target surface at the location defined by the rect,
    blit in a loop until you have all your images blitted
    then finally use SDL_SaveBMP() to capture the target surface
    Last edited by rogster001; 12-01-2009 at 07:26 AM.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21