Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: redspark on Tue 26/05/2009 12:00:34

Title: Character Export File Format Question
Post by: redspark on Tue 26/05/2009 12:00:34
I know that the Character file that is exported from AGS 3.1+ is an XML format.  The only part I'm not sure of is how the sprite image data is stored.  What format is the binary data that is between the SpriteData elements?  Is that UUEncoding of some type?  If so, what algorithm and what is the format of the original source binary data?  PNG? RAW Binary?  or something else?  Thanks.

James
Title: Re: Character Export File Format Question
Post by: Pumaman on Tue 26/05/2009 18:06:14
It is just Base64-encoded raw binary data, Width x Height x Bpp.
Title: Re: Character Export File Format Question
Post by: redspark on Tue 26/05/2009 18:53:38
That makes sense although I haven't seen Base 64 with output looking like that before.  So the binary data is something like:
red,green,blue,alpha, red,green,blue,alpha, red,green,blue,alpha, ... width, height, bpp
?  

Thanks.
Title: Re: Character Export File Format Question
Post by: Pumaman on Tue 26/05/2009 19:16:56
Well, the format of the binary data depends on the colour depth, but for a 32-bit image with alpha channel then yes it will be

RGBARGBARGBARGBA...

or maybe

BGRABGRABGRABGRA...

I can't remember exactly which way round
Title: Re: Character Export File Format Question
Post by: redspark on Tue 26/05/2009 20:00:35
Thanks.  I'll give that a shot to see what happens. :)