Editing just one image?

BlitzMax Forums/BlitzMax Beginners Area/Editing just one image?

UnderwoodNullium(Posted 2008) [#1]
Okay, I think the correct way to accomplish this is by using pixmaps, but some of the examples I've seen with these seem to suggest that pixmaps are only able to 'grab' an area of the screen, and save it as a 'pixmap'.

I am looking for a way to 'edit' a single image (like make some kind of image buffer, where all my drawing commands will only happen on that image when I need it to), and not 'grab' it because I have overlapping images that need to be changed real-time, but I think err, pixmaps don't do that? I'm pretty sure I'm wrong about this...

Thanks for any help in advance!


tonyg(Posted 2008) [#2]
Lockimage returns a pixmap that you can change by pixel but not use any draw commands.


UnderwoodNullium(Posted 2008) [#3]
Okay, so I can just lock a single image, and then I'll be able to play around with it? And thanks for the FAST response!


UnderwoodNullium(Posted 2008) [#4]
Okay, and that's exactly what I was wanting to do, thanks!


tonyg(Posted 2008) [#5]
Lock the image then you can change pixels using writepixel on the pixmap returned. Unlockimage doesn't really do anything but you might want to use it for any future proofing though. The next time you draw the image it will reload itself from the changed pixmap.


UnderwoodNullium(Posted 2008) [#6]
Thanks again for your help, TonyG. That's exactly what I needed to know.