LoadAnimImage

Blitz3D Forums/Blitz3D Programming/LoadAnimImage

Zach3D(Posted 2007) [#1]
I have an animated image, with 4 frames, and it is 25x25

When I load it , it always says the image does not exist.

Type Character
	Field x,y
	Field img
	Field name$
	Field frame
End Type

char.character = New character
char\img=LoadAnimImage("ashp.gif",25,25,0,4)
MaskImage char\img,255,255,255
char\x=125
char\y=75
Char\frame=1


I've tried loading multiple animations, and they always have errors. , The error occurs at "MaskImage char\img,255,255,255"

It says the image does not exist.

I am also 100% sure the image is in the correct directory, and all the non-animated images load successfully.


D4NM4N(Posted 2007) [#2]
try this:
turn debug on
before the maskimage line
paste in: debuglog char\img

when it gives an error look at the debug log
if its 0 it means the image hasnt loaded for some reason.

Could be because:
.gif is that even supported? try png instead
.gif is encoded in an incompatale way (interlacing, version or something may effect it)

I dont use animimage much but i dont think it loads animation files, i think it loads in a spriteset (a strip of images) but could be mistaken


Zach3D(Posted 2007) [#3]
I am using paint shop pro 7 and animation shop 7, both of these have never had a problem loading into blitz before.
And I already tried the DebugLog char\img before i posted this, to test, and it returned 0.

In animation shop 7 the only supportable export for blitz is .gif... And It's not because of my gif, I have tried other animations i downloaded off the internet, and they didn't work either.


Matty(Posted 2007) [#4]
Is each frame in the image 25x25 or is the entire image 25x25?


GfK(Posted 2007) [#5]
Um, LoadAnimImage doesn't support GIF format animation.

Convert it to a 100x25 animstrip in PNG format, and use that instead.