Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to precisely modify screen colors by RGB channel?
Forum Updated to NodeBB v4.3 + New Features

How to precisely modify screen colors by RGB channel?

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 393 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.
  • K Offline
    K Offline
    KotorIzzZ
    wrote on last edited by
    #1

    I researched a watermarking algorithm for images and wanted to apply it to the screen. I need to modify the value of the R/B channel to form a watermark image, so that the watermark is nearly unreliable. I can easily modify the images' color, but how can I apply it to the screen?
    I tried creating a borderless transparent window and attaching an image with an alpha channel. but, when a RGBA color (255,0,0,15) overlaid on the black (0,0,0), it becomes like (15,0,0). when it overlaid on the white (255,255,255), it becomes like (255,240,240). So, when I grab the screen, the R channel could show the watermark image in the darker area. In the lighter area, the matrix value is almost pure 255.
    How could I precisely modify screen colors with Qt? Thank you!
    Btw I use python, I would be very grateful if you could answer using python not c++ :) .

    Pl45m4P 1 Reply Last reply
    0
    • K KotorIzzZ

      I researched a watermarking algorithm for images and wanted to apply it to the screen. I need to modify the value of the R/B channel to form a watermark image, so that the watermark is nearly unreliable. I can easily modify the images' color, but how can I apply it to the screen?
      I tried creating a borderless transparent window and attaching an image with an alpha channel. but, when a RGBA color (255,0,0,15) overlaid on the black (0,0,0), it becomes like (15,0,0). when it overlaid on the white (255,255,255), it becomes like (255,240,240). So, when I grab the screen, the R channel could show the watermark image in the darker area. In the lighter area, the matrix value is almost pure 255.
      How could I precisely modify screen colors with Qt? Thank you!
      Btw I use python, I would be very grateful if you could answer using python not c++ :) .

      Pl45m4P Online
      Pl45m4P Online
      Pl45m4
      wrote on last edited by
      #2

      @KotorIzzZ said in How to precisely modify screen colors by RGB channel?:

      How could I precisely modify screen colors with Qt?

      There is nothing as "screen colors". The widgets are drawn as any other widget as well.

      Btw I use python, I would be very grateful if you could answer using python not c++ :) .

      Then the Qt for Python section would be more fitting. I think your topic will be moved there by the mods :)


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      K 1 Reply Last reply
      0
      • SGaistS SGaist moved this topic from General and Desktop on
      • Pl45m4P Pl45m4

        @KotorIzzZ said in How to precisely modify screen colors by RGB channel?:

        How could I precisely modify screen colors with Qt?

        There is nothing as "screen colors". The widgets are drawn as any other widget as well.

        Btw I use python, I would be very grateful if you could answer using python not c++ :) .

        Then the Qt for Python section would be more fitting. I think your topic will be moved there by the mods :)

        K Offline
        K Offline
        KotorIzzZ
        wrote on last edited by
        #3

        @Pl45m4 Ty for the reply!
        The "screen color" is just like a result. When I add a watermark of RGBA Image, the "screen color" would be changed.
        Just like this. 无标题.png
        You could find some red square there. The background color is #1E1F22, The red square is #211F22. The value of R channel increased 3.
        but when I use some lighter background like: 无标题2.png
        The background's color is #FFFFFF. The red square is #FFFAFA. The value of R channel is pure 255.
        In the algorithm, the watermark is added to one channel. Therefore, the DNN also accepts one channel data. but the way I add the watermark on the screen would change different channels in different condition.
        What I really want is, ideally, I can exactly change (reduce is better) one of the channel whatever the background color is. Or, regardless of small changes in other channels, the red channel's value should change whatever the background color is. (In the white background condition, the R channel is pure 255, whatever I added is 0 or 1)

        1 Reply Last reply
        0

        • Login

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