Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Moved] Filter an image with an qRGB component.
Forum Updated to NodeBB v4.3 + New Features

[Moved] Filter an image with an qRGB component.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bensha
    wrote on 8 Aug 2011, 17:10 last edited by
    #1

    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

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on 8 Aug 2011, 17:17 last edited by
      #2

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

      1 Reply Last reply
      0

      2/2

      8 Aug 2011, 17:17

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved