RE: 32 bit QPixmap -> 8 bit, non-dithered QImage
The internals of
image = pixmap.toImage().convertToFormat(QImage::Format_Indexed8, Qt::AvoidDither);
converts the 32b pixmap to a 32b image, then converts the 32b image to indexed 8. The indexed conversion hashes the colors into a color table. But the source input image is Format_ARBG32; that forces quantization and quantization forces dithering.
I suppose now that I could first convert it to RGB888:
image = pixmap.toImage().convertToFormat(QImage::Format_RGB888 );
image = image.convertToFormat(QImage::Format_Indexed8, Qt::AvoidDither);
but that's getting really ugly.
Robert
Robert Skinner
Bentley Systems
This post has been edited 1 times, last edit by "rlskinner" (May 6th 2008, 6:11pm)