How to precisely modify screen colors by RGB channel?
-
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++ :) . -
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++ :) .@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 :)
-
S SGaist moved this topic from General and Desktop on
-
@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 :)
@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.
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:
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)