summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/palette.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/palette.c')
-rw-r--r--src/lib/util/palette.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/util/palette.c b/src/lib/util/palette.c
index c343808f67e..e659f152830 100644
--- a/src/lib/util/palette.c
+++ b/src/lib/util/palette.c
@@ -230,6 +230,18 @@ int palette_get_num_groups(palette_t *palette)
/*-------------------------------------------------
+ palette_get_max_index - return the maximum
+ allowed index (i.e., length of arrays returned
+ by palette_entry_list*)
+-------------------------------------------------*/
+
+int palette_get_max_index(palette_t *palette)
+{
+ return palette->numcolors * palette->numgroups + 2;
+}
+
+
+/*-------------------------------------------------
palette_get_black_entry - return the index of
the black entry
-------------------------------------------------*/