I\'ve used an example code (source: https://forum.qt.io/topic/11390/increasing-contrast-of-qimage/4) to change contrast of a QImage (I\'ve also edited it a little) :