Checking if an image was loaded with LoadAnimImage

BlitzMax Forums/BlitzMax Beginners Area/Checking if an image was loaded with LoadAnimImage

goldstone(Posted 2006) [#1]
Is it possible to check if an image was loaded with LoadImage or LoadAnimImage? Or perhaps a way to get the total number of frames an image contains?

Thanks.


H&K(Posted 2006) [#2]
if loadimage(url)=NULL
(I think)


Dreamora(Posted 2006) [#3]
Yes it is. if image.frames.length > 1 then it is an anim image.


goldstone(Posted 2006) [#4]
Great, cheers.


(tu) ENAY(Posted 2006) [#5]
You could just try drawing out all your images as soon you've loaded them. If BMax crashes, assume it didn't work :)

> Or perhaps a way to get the total number of
> frames an image contains?

Um, but you have to declare that when you load an animimage, so surely you must know it already? Or maybe you're doing something more clever than this.


Dreamora(Posted 2006) [#6]
Total number of frames is again image.frames.length btw as image.frames is an array of TImageFrame within TImage that holds all image frames of this specific image.