summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-25 16:29:49 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-12 12:52:34 +0000
commitcd06d901af2b7c707db430293ab6efae354f4742 (patch)
treeaee9da4229a64238a8846f0e21b05bce910007e0 /src/corelib/global
parent1bd0ab7050304d9e8989cde77e486947c56b9696 (diff)
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 <gunnar@sletta.org>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qnamespace.qdoc22
1 files changed, 10 insertions, 12 deletions
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