Home › Forums › TimelineFX Editor › TPA header › Re: Re: TPA header
Hello, the 128bit header consists of 4 32bit ints containing the width,height, number of frames and the total size of the png.
Here’s the actual save function in Blitzmax:
Function saveTPA(filename:String, anim:TPixmap, w:Int, h:Int, frames:Int)
Local tempstream:TStream = WriteStream(filename)
Local tempbank:TBank = CreateBank()
SavePixmapPNG(anim, tempbank)
WriteInt(tempstream, w)
WriteInt(tempstream, h)
WriteInt(tempstream, frames)
WriteInt(tempstream, BankSize(tempbank))
WriteBank(tempbank, tempstream, 0, BankSize(tempbank))
tempstream.Close()
End Function
Can you upload an example TPA that you’re trying to load, as I can’t seem to recreate that error here. Thanks!