IMAGE: Allow for choosing dither type

This commit is contained in:
Matthew Hoops 2014-08-18 18:31:38 -04:00
parent ad32fb5832
commit f342d63431
4 changed files with 21 additions and 14 deletions

View file

@ -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) {}
};
/**