Saving Images

Blitz3D Forums/Blitz3D Beginners Area/Saving Images

Stevie G(Posted 2004) [#1]
Just getting into using some of the 2d commands. I have an image with quite a few frames but I don't see any commands to save them as one BMP and then load them via loadanimimage. Please tell me I don't have to save them all individually??


Binary_Moon(Posted 2004) [#2]
All you need to do is create a new image (CreateImage) that is big enough to store all of the images, and then copy all the images to the correct position on that image (copyrect/ copybuffer) save that image (saveimage/ savebuffer)


Stevie G(Posted 2004) [#3]
Thought that might be the case - thanks. What is the correct position though? Say if my bigger image was wide enough to hold 4 smaller images are they referenced like this?

00 01 02 03 04
05 06 07 08 etc..


Ross C(Posted 2004) [#4]
That gets defined when you create it.

CreateImage (100,100,5)

Now, internally, i don't know how that would be layed out. Probably side by side, never really tried it, but you don't need to worry about that. Copyrect has am optional frame parameter, you use for selecting which frame of the image, you wish to copy to.


Stevie G(Posted 2004) [#5]
That's not what I mean Ross. I've made 80 or so images using the frames flag already - the question is what positions do I copy them to on the bigger image i.e. the one I'm going to save.


Ross C(Posted 2004) [#6]
Side by side would be the simplist.

#= image frame

  ________
  |######|
  |######|
  --------


You could do it like that. It doesn't matter, as long as their is enough frames. The way in which it works is left to right, then down and back to the left. Like reading text in a book :)


Stevie G(Posted 2004) [#7]
Cheers Ross - makes sense.