QColorMap: Pseudo colors with Qt
-
wrote on 12 Oct 2016, 09:50 last edited by QtAndrew 10 Dec 2016, 12:25
-
Hello,
i want to apply "false colors" or "pseudo colors" onto a grayscale QImage but i didn't find any adequate way to do this...? Is there any support apart from writing a native QColor vector and change the color for every pixel i paint?I cannot find any examples for QColorMap
@QtAndrew
I haven tested it but worth a try, since your screenshot lets me assume you anyway want to show max. 256 colors?First convert the QImage to
QImage::Format_Indexed8
format, then iterate over the image's color-table and replace the colors based on their value with your colors. -
wrote on 12 Oct 2016, 13:43 last edited by
this is the classical was, but i develop on an embedded device and ask me if there is no other way to directely do this in qt.
-
wrote on 12 Oct 2016, 20:47 last edited by
So after all the Research i have implemented this function yb my own, there is no native Support for pseudo Colors as far i have seen...
4/4