]> git.draconx.ca Git - liblbx.git/commit
lbximg: Fix wart in frame scanline header format
authorNick Bowler <nbowler@draconx.ca>
Tue, 17 Dec 2013 04:49:30 +0000 (23:49 -0500)
committerNick Bowler <nbowler@draconx.ca>
Tue, 17 Dec 2013 04:57:19 +0000 (23:57 -0500)
commitfc46251027e2c65bff081cc04939ff13015501aa
tree36a113974586d2b99c442512ada17c784414073c
parentf58512db610bb5ce272a142a552b8bf75b8c2f6e
lbximg: Fix wart in frame scanline header format

The format of frame scanlines has been a little weird since day 1: We
had 2 "types" of scanline headers disambiguated by some non-trivial
logic, including whether or not it was the first decoded scanline in
the frame.

Here's a new, simpler approach, which has only one type of scanline
header, consistent meanings to the header fields, and by interpreting
the first 4 bytes as a "frame header" we get rid of the special case
for the first scanline, too.

Add a document in English which describes the LBX image file format, to
be used as the baseline format specification going forward.

Finally, update the contrived test cases for the new format.  All the
test cases using actual MOO2 data still pass.
doc/txt/image-format.txt [new file with mode: 0644]
src/image.c
tests/testdata/image-1x1
tests/testdata/image-1x1-mt