How can I get access to the animated sprites?

BlitzPlus Forums/BlitzPlus Programming/How can I get access to the animated sprites?

DrFate(Posted 2011) [#1]
Hi all! Everybody knows the great function LoadAnimImage(). This function is very useful for making animation effects and tilemaps and works very good with function DrawImage(), that allows us to draw any frame from image strip, but... Have you thought about how can we get any image without DrawImage()? For example, I want to rotate every image from the strip and copy it to some another image, what should I do? Image handle is not an array and I can't get sprite throught arr[n] or arr(n). Maybe, there is some function in BlitzPlus which can get any image from the strip?


Matty(Posted 2011) [#2]
Sorry but what do you mean by 'get any image without drawimage'?

If you mean you wish to extract the frames from the image and put them into single image handles rather than an animimage handle then simply use copyrect or grabimage, either will work.


DrFate(Posted 2011) [#3]
Yes, I'd like to extract the images from the strip to rotate them later. I thought, there are some special functions for working directly with image strip handle to extract each frame from it. It would be something like the_frame = GetFrame(anim_handle). So, I see there are no such opportunities in Blitz Plus. I've used GrabImage() function but had some problems with rotation center and decided to find an alternative instead fixing this problems. Now I see it's the only way to solve this problem. Thanks, Matty :)