image handles

Blitz3D Forums/Blitz3D Beginners Area/image handles

MattVonFat(Posted 2004) [#1]
I was writing a bit of code and put this in:

image=LoadAnimImage("pacman_up.bmp", 50, 50, 0, 1)
MaskImage image,255,0,255

but the debugger keeps giving me an error saying invalid image handle.

Also locate doesnt seem to work for me.

Can anyone help me with any of these?


EOF(Posted 2004) [#2]
Have you set a graphics mode up first?

Is the pacman image in the root folder of where your program is saved?

Try:
image=LoadAnimImage("pacman_up.bmp", 50, 50, 0, 1)
DebugLog image

If the result is 0 then either Blitz cannot find the or the image file is invalid.

Another thing, your example above is using only 1 frame of animation. Is this right?

Also locate doesnt seem to work for me
Are you using BlitzPlus? If so the locate command has been removed.

See if this works:
Graphics 640,480
SetBuffer BackBuffer()
image=LoadAnimImage("pacman_up.bmp",50,50,0,4) ; <-4 frames of animation
MaskImage image,255,0,255
DrawImage image,100,100
Flip
WaitKey
End



MattVonFat(Posted 2004) [#3]
thanks i got it working now!