loadanimimage : getframes ?

BlitzMax Forums/BlitzMax Beginners Area/loadanimimage : getframes ?

hub(Posted 2006) [#1]
hi !
is there a method to access to the number of frames of an image loaded with loadanimimage ?
Thanks !


tonyg(Posted 2006) [#2]
image:TImage = LoadAnimImage("for_tanim6.png",32,32,0,6)
Print SizeOf(image.frames)/4
image1:TImage = LoadAnimImage("for_tanim4.png",32,32,0,4)
Print SizeOf(image1.frames)/4



Yan(Posted 2006) [#3]
LOL at tonyg's SizeOf() fetish. ;o)

Global BMXPATH$ = getenv_("BMXPATH")

Graphics 800, 600, 0

Local images:TImage = LoadAnimImage(BMXPATH$ + "\samples\birdie\games\tiledrop\media\blocks.png",..
                                    32, 32, 0, 16)

Print                                   
Print "Image contains " + images.frames.length + " frames."



hub(Posted 2006) [#4]
Thanks !


tonyg(Posted 2006) [#5]
LOL at tonyg's SizeOf() fetish. ;o)


Who would have thought the question would come up twice.
len(image.frames) works as well.