Closed HeroesGrave closed 10 years ago
Format details:
[int]: width
[int]: height
{Recursive Structure}: canvas data
[RGBA array]: image data
[int]: child count
{Recurses <child count> times}
{End Recursive Structure}
[int]: EOID
Basically, it has the width and height, then the root canvas' image data and child count, followed by each child's image data and child count... etc.
Btw, I'm going to make a gzipped version before closing this. Raw image data takes up a lot of space.
Wow. Running gzip on a 12.8MB test lbin file cuts it down to 80 KB, xz gets it to 70KB, bzip2 gets it to 50KB.
Results will of course vary, but that's lots of compression.
Definitely implementing zlbin.
Also, I haven't got a dialogue working for the LBIN importers/exporters. It's a bit tricky calculating the size.
LBIN to start off with, we can get more complicated later (#43).