From f342d63431fc0784adc08648f17a6bbad934743f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 18 Aug 2014 18:31:38 -0400 Subject: IMAGE: Allow for choosing dither type --- image/codecs/codec.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'image/codecs/codec.h') diff --git a/image/codecs/codec.h b/image/codecs/codec.h index 3a2da9ff1e..9abbb3d183 100644 --- a/image/codecs/codec.h +++ b/image/codecs/codec.h @@ -58,6 +58,17 @@ public: Codec() {} virtual ~Codec() {} + /** + * A type of dithering. + */ + enum DitherType { + /** Video for Windows dithering */ + kDitherTypeVFW, + + /** QuickTime dithering */ + kDitherTypeQT + }; + /** * Decode the frame for the given data and return a pointer to a surface * containing the decoded frame. @@ -89,17 +100,13 @@ public: /** * Can the codec dither down to 8bpp? - * - * @note This should only be used for VFW codecs */ - virtual bool canDither() const { return false; } + virtual bool canDither(DitherType type) const { return false; } /** * Activate dithering mode with a palette - * - * @note This should only be used for VFW codecs */ - virtual void setDither(const byte *palette) {} + virtual void setDither(DitherType type, const byte *palette) {} }; /** -- cgit v1.2.3