Stitching Images Together and Extracting SubImage

BlitzMax Forums/BlitzMax Beginners Area/Stitching Images Together and Extracting SubImage

Carl S.(Posted 2006) [#1]
Carl S. (Posted 56 seconds ago) Edit

Any direction on doing the following:

1. Take 10 or more images and combine them together vertically or horizontally. All images are the exact same size.

2. Create a new image from this "stitching"

3. Select a portion of this new image which covers 3-4 times the size of the one of the original single images and copy the portion to yet another image

4. Display the image

5. Repeat Steps 3 and 4 as needed

Also, would like to be able to do this in Max2D (native and MaxGUI)

Thanks


tonyg(Posted 2006) [#2]
Doesn't this do most of what you want?


Carl S.(Posted 2006) [#3]
Sort of, but not really. 8-)


tonyg(Posted 2006) [#4]
ok,
1) Load each image as a pixmap (or lock a TImage into a pixmap) and calculate the width and height of stitching them together.
2) Create a pixmap of the width/height calculated in 1).
Use pixmap paste method to stitch the images into one.
3) Use that pixmap and pixmap paste or draw and grabimage into the newe image.
4)m Drawimage
5) repeat.
Personally, once I had the pixmap in 3) I would loadimage into an image and then use either the viewport or setuv method to draw a portion without creating another image.


Carl S.(Posted 2006) [#5]
Could I use PixmapWindow to grab the portion (#3)? and then convert back to an image?


tonyg(Posted 2006) [#6]
I think so. What happened when you tried?
<edit> I believe that's how LoadAninImage does it.


ImaginaryHuman(Posted 2006) [#7]
I would lock an existing image, get it's pixmap and work with that as your stiching thing, then unlock it to draw, rather than having separate pixmap.