_imImage.palette_count

< The palette is always 256 colors allocated, but can have less colors used.

struct _imImage
int palette_count;

Meta