Hi friends,
I can not change the format of an image.
I want the image has only 8 bits, only 256 colors, but any changes will not work.
I tried setNumColors(), convertToFormat(), and not work.
imageF
= imageF.
convertToFormat(QImage::Format_Indexed8, Qt
::ThresholdDither|Qt
::AutoColor);
ui
->label
->setPixmap
(QPixmap::fromImage(imageF
));
QImage imageF = QImage(fn);
imageF = imageF.convertToFormat(QImage::Format_Indexed8, Qt::ThresholdDither|Qt::AutoColor);
ui->label->setPixmap(QPixmap::fromImage(imageF));
To copy to clipboard, switch view to plain text mode
What the possible problem?
Bookmarks