painting a grayscale image into label
How do i use
QImage convertToFormat
& set color
I need to make whatever is black in the image and make it transparent
& whatever is white or partially white and make another color
while(x < secondaryImage.height()){
while(y < secondaryImage.width()){
if (secondaryImage.pixel(x,y) == 0)
secondaryImage.setPixel(x, y, Qt::red);
y++;
}
x++;
}
while(x < secondaryImage.height()){
while(y < secondaryImage.width()){
if (secondaryImage.pixel(x,y) == 0)
secondaryImage.setPixel(x, y, Qt::red);
y++;
}
x++;
}
To copy to clipboard, switch view to plain text mode
Thats what i got so far from other post
But its not working
If someone could please show me an example of how to go about doing it
or direct me accordingly
Kind Regards
Bookmarks