From cd06d901af2b7c707db430293ab6efae354f4742 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 25 Feb 2016 16:29:49 +0100 Subject: Implement ordered dithering for image format conversions QImage::convertToFormat was ignoring its conversion flag argument, only performing dithering when converting to indexed formats. This patch updates the documentation and implements ordered dithering for other conversions. Change-Id: I807353d61669694185b7e595ef262d80d9fbb3f1 Reviewed-by: Gunnar Sletta --- src/corelib/global/qnamespace.qdoc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/corelib/global/qnamespace.qdoc') diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index dfa7112043..03ebc1d106 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -737,27 +737,25 @@ \value MonoOnly The pixmap becomes monochrome. If necessary, it is dithered using the chosen dithering algorithm. - Dithering mode preference for RGB channels: + Dithering mode preference: - \value DiffuseDither (default) - A high-quality dither. - \value OrderedDither A faster, more ordered dither. + \value DiffuseDither (default) - A high-quality dither using error diffusion. + \value OrderedDither A faster, ordered dither. \value ThresholdDither No dithering; closest color is used. - Dithering mode preference for alpha channel: + Dithering mode preference for 1-bit alpha masks: \value ThresholdAlphaDither (default) - No dithering. - \value OrderedAlphaDither A faster, more ordered dither. - \value DiffuseAlphaDither A high-quality dither. + \value OrderedAlphaDither A faster, ordered dither. + \value DiffuseAlphaDither A high-quality dither using error diffusion. \omitvalue NoAlpha Color matching versus dithering preference: - \value PreferDither (default when converting to a pixmap) - Always dither - 32-bit images when the image is converted to 8 bits. - \value AvoidDither (default when converting for the purpose of saving to - file) - Dither 32-bit images only if the image has more than 256 - colors and it is being converted to 8 bits. - \omitvalue AutoDither + \value PreferDither Always dither images when converting to smaller color-spaces. + \value AvoidDither Only dither to indexed formats if the source image uses more + different colors than the size of the color table of the destination format. + \value AutoDither (default) - Only dither when down-converting to 1 or 8-bit indexed formats. \omitvalue ColorMode_Mask \omitvalue Dither_Mask -- cgit v1.2.3