[Qt-interest] Bitmaps and coloring thresholds
BRM
bm_witness at yahoo.com
Fri Mar 12 18:09:20 CET 2010
I have a bitmap that uses an 8-bit per pixel index (QImage::Format_Indexed8) where I map out a 256 color grey scale.
The image is then converted to a QPixMap and put into a QGraphicsScene.
I want to set threshold values. Presently I do this on the image as I build it by using the QImage::setColorTable() with a table initialized how I like.
This works very well so long as I am creating and loading new images.
However, I'd like to be able to modify the color table on an already displayed QPixMap.
I know I could call QPixMap::toImage(), rebuild the color table, and do another QPixMap::fromImage() on it; however, that seems rather inefficient.
Is there a more efficient way to do this?
TIA,
Ben
More information about the Qt-interest-old
mailing list