]> git.draconx.ca Git - liblbx.git/commit
liblbx: Clean up embedded palette handling
authorNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 03:00:27 +0000 (22:00 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 05:39:01 +0000 (00:39 -0500)
commite58493762dbd70870b7bdc1fd9fc922485c91c2c
tree9aab9863663dc777522de2fb685452e901399934
parent9f64a8229b5299c6815bef7b9f4180f9232ed52e
liblbx: Clean up embedded palette handling

We don't need to read the embedded palette information with the rest of
the header, we can defer that to much later when the palette is actually
needed.  This makes more sense conceptually, simplifies the code a bit,
and saves some bytes in the image state structure.

Since we're basically rewriting lbx_img_getpalette anyway, take this
opportunity to give it a better interface.  It now returns the number
of embedded palette entries, allowing us to eliminate the palette size
feature in lbx_img_getinfo.
src/image.c
src/image.h
src/lbximg.c