Quote Originally Posted by wysota View Post
There is no QGuessWhatIWantAndDoIt class in Qt.
Sometimes I regret that there is no such class

This code decrease saturation for each pixel:
Qt Code:
  1. QImage img;
  2. img = pixmap.toImage();
  3. int w = img.width();
  4. int h = img.height();
  5. for (int y = 0; y < h; ++y)
  6. {
  7. for(int x = 0; x < w; ++x)
  8. {
  9. QColor pixel = img.pixel(x, y);
  10. pixel.setHsl(pixel.hue(), 30, pixel.lightness(), pixel.alpha());
  11. img.setPixel(x, y, pixel.rgba());
  12. }
  13. }
  14. //return QPixmap::fromImage(img, Qt::AutoColor)
To copy to clipboard, switch view to plain text mode 
What do you think, It is not too time-consuming process?