TPA header
- This topic has 1 reply, 2 voices, and was last updated 13 years, 8 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Home › Forums › TimelineFX Editor › TPA header
Hi,
What’s the exact content of the TPA header? Could you publish its format?
It looks like TPA is just PNG with an extra 128bits header.
By the way I can’t load any TPA I saved, it always crashes saying EXCEPTION_ACCESS_VIOLATION (WinXP)
It looks like the first two 32bits values in the header are twice the width and height of everyframe for some reason…
I’m running version 1.25.
Cheers,
S.
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!
You must be logged in to reply to this topic.