[Moved] Filter an image with an qRGB component.



  • Hi Guys,

    I would like to filter an image (QImage myImage) with a color (QRgb myColor).
    The purpose is to obtain a new image with black and white pixels.
    Black pixels should match with myColor pixels of myImage.

    for example, if I have a blue cup on myImage and I filter with a blue component, I want to obtain the black shape of my cup in myNewImage.

    Which function can I use for doing that?

    I tried to use createMaskFromColor function and apply it to my image, but I didn't succeed.
    My code :
    @myNewImage=myImage.createMaskFromColor(color, Qt::MaskOutColor);@

    Cheers mates!

    @ tags added
    Eddy



  • Moved to General and Desktop because it is Qt-related topic.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.