|
Joey_Chan 发表于 2015-7-10 20:27
https://forum.qt.io/topic/11390/increasing-contrast-of-qimage/5
http://stackoverflow.com/question ...
非常感谢你的连接,不过有疑惑,还请大神指教下:
int changeBrightness( int value, int brightness) {
return qBound<int>(0, value + brightness * 255 / 100, 255);
}
int changeContrast( int value, int contrast ) {
return qBound<int>(0, int(( value - 127 ) * contrast / 100 ) + 127, 255 );
}
里面两个参数分别代表啥 |
|