Is there a way to determine from the data structure the number of frames in a TImage that is Loaded with an animated image?
Animated Images
BlitzMax Forums/BlitzMax Programming/Animated Images myTImage.Frames ?
I think that is an array of the frames?
Dunno.... struggling to find documentation about it...
myImage.frames.length should do the trick.
This is what I use:
Function ImageFrames%(Image:TImage)
Return Image.Frames.Dimensions()[0]
End Function
I don't know about that length suggestion. I don't see why it would be stored in two locations, or how I could have missed that. :-)
Function ImageFrames%(Image:TImage)
Return Image.Frames.Dimensions()[0]
End Function
I don't know about that length suggestion. I don't see why it would be stored in two locations, or how I could have missed that. :-)
Ah I see. Dimensions was a special array command, and Length is as well. Length returns the total number of elements, and Dimensions I guess is for multi dimensional arrays which have elements of different lengths maybe?