aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/image_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/decoders/image_decoder.h')
-rw-r--r--graphics/decoders/image_decoder.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/decoders/image_decoder.h b/graphics/decoders/image_decoder.h
index 830645d361..49e31c6e3a 100644
--- a/graphics/decoders/image_decoder.h
+++ b/graphics/decoders/image_decoder.h
@@ -78,10 +78,15 @@ public:
* The palette's format is the same as PaletteManager's palette
* (interleaved RGB values).
*
- * @return the decoded palette, or 0 if no palette is present
+ * @return the decoded palette, or undefined if no palette is present
*/
virtual const byte *getPalette() const { return 0; }
+ /**
+ * Query if the decoded image has a palette.
+ */
+ virtual bool hasPalette() const { return getPaletteColorCount() != 0; }
+
/** Return the starting index of the palette. */
virtual byte getPaletteStartIndex() const { return 0; }
/** Return the number of colors in the palette. */