C++ (Qt) QPixmap alpha = m_openedPix.alphaChannel(); QImage img = m_openedPix.toImage(); for( int w = 0; w < img.rect().right(); w++ ) { for( int h = 0; h < img.rect().bottom(); h++ ) { QColor col( img.pixel(w,h) ); col.setHsv(col.hue(), 0, col.value(), col.alpha()); img.setPixel(w,h,col.rgb()); } } m_openedPix = QPixmap::fromImage( img ); m_openedPix.setAlphaChannel( alpha );