Help needed to make a masked colour filter layer

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
roberts-end
Posts: 29
Joined: Tue Mar 25, 2014 7:38 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Packard Bell S2885
processor: i5-440 Haswell
ram: 8gb
Video Card: on board Intel HD 4600
Hard_Drive_Capacity: 1Tb SSD
Monitor/Display Make & Model: Dell U2415
Corel programs: PSP 8 -> PSP2018

Help needed to make a masked colour filter layer

Post by roberts-end »

Hi,
I'm tryingto make a diagram that illustrates how the individual RGB dots on a screen make up a coloured image. The plan is to take a screen shot, expand it by 3x so that I have lots of 3x3 pixel blocks, each in a different colour. I then want to apply three masked layers containg vertical stripes filter for the red, green and blue component of the underlying blcok. The end result will be an image that, from a distance looks like the original, but close up shows as vertical red, green and blue sub-pixels arranged in columns (like a flat screen monitor examined througha microscope). Can anyone give me a lead as to how to make a layer that acts as a red/green or blue filter? There are so many options I am a bit lost.

Many thanks
roberts-end
Posts: 29
Joined: Tue Mar 25, 2014 7:38 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Packard Bell S2885
processor: i5-440 Haswell
ram: 8gb
Video Card: on board Intel HD 4600
Hard_Drive_Capacity: 1Tb SSD
Monitor/Display Make & Model: Dell U2415
Corel programs: PSP 8 -> PSP2018

Re: Help needed to make a masked colour filter layer

Post by roberts-end »

Sorted - Made an overlay of red/green/blue lines and then set combine mode to multiply. Here is the result showing how Word renders text when ClearType is turned on. Stand at a distance and squint to see the effect.
2020-01-20_154349.png
2020-01-20_154349.png (4.33 KiB) Viewed 1249 times
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Help needed to make a masked colour filter layer

Post by Jean-Luc »

roberts-end wrote: Stand at a distance and squint to see the effect.
I don't see what you are trying to demonstrate. Perhaps I don't understand what you say?
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
roberts-end
Posts: 29
Joined: Tue Mar 25, 2014 7:38 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Packard Bell S2885
processor: i5-440 Haswell
ram: 8gb
Video Card: on board Intel HD 4600
Hard_Drive_Capacity: 1Tb SSD
Monitor/Display Make & Model: Dell U2415
Corel programs: PSP 8 -> PSP2018

Re: Help needed to make a masked colour filter layer

Post by roberts-end »

Sorry - my post a bit of a mess.

I am investigating how various word processors render text. Here is some text rendered to the screen by MS Word:
100percent.png
100percent.png (7.05 KiB) Viewed 1579 times
To my eyes the text is not pure black and white. There are some sort of colour fringes that fatigue my eyes.
Here is an actual macro photograph of the word 'in' as it appears on my screen:
P1000771.jpg
The computer screen is made up of tiny red green and blue dots. Each pixel has a red, green and blue elements (no white!). You can see the dust on the screen and the texture in the individual elements caused by the manufacturing process.

To examine in more detail I take a screen grab and magnify it by about 1500% . The last line looks something like this:
1500percent.png
1500percent.png (5.96 KiB) Viewed 1204 times
You can see the pixel structure but something is wrong. The screen should only show red, green and blue (no white!). Its not what is actually on my screen.


To make a representation of what is actually on the screen I overlay a layer with red, green and blue stripes aligned to the pixel boundaries and set the blend mode to multiply. This shows a representation of what is actually on the screen. Its composed of red, green and blue sub-pixel elements. Here it is at two different magnifications:
2020-01-20_215544a.png
2020-01-20_215544a.png (4.66 KiB) Viewed 1579 times
The first shows the overall effect. If you blur it sligfhtly you can see the colour fringes. I find it most notable in the 'l' at the right hand edge of the striped part where the is a clear red line.
The second shows it in more detail.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Help needed to make a masked colour filter layer

Post by Jean-Luc »

roberts-end wrote:The screen should only show red, green and blue (no white!).
IMHO, the screen should only show black and white. Black is all pixels displayed at their lower luminosity value and white color means all pixels are displayed at their maximum luminosity value. What you see is the "rendering" made by Windows and the graphic card, IMO. This rendering results from a mathematical formula because the letter (o, for example) must be drawn in a grid made of squares/rectangles (the physical screen). If a portion of the letter (say one pixel wide) must be placed between two "screen" pixels, the system calculates an average value for both screen pixels, here (on your example) displayed in different colors. Viewed from a 'normal' distance (say 30-50 cm) from the screen, the illusion is that we see letters in black and white.

What we see is also reconstructed by our brain. In the image shown here,

http://pspcookbook.com/?page_id=420
267. Creating an optical Illusion

you see red color, blue color and, in the third lower part, magenta color. But magenta doesn't exist in the image. If you enlarge it, you will see only red and blue squares. Our brain translates it in magenta, like the red, blue and green 'pixels' of the screen, at their maximum value, are seen as white.
:wink:
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
roberts-end
Posts: 29
Joined: Tue Mar 25, 2014 7:38 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Packard Bell S2885
processor: i5-440 Haswell
ram: 8gb
Video Card: on board Intel HD 4600
Hard_Drive_Capacity: 1Tb SSD
Monitor/Display Make & Model: Dell U2415
Corel programs: PSP 8 -> PSP2018

Re: Help needed to make a masked colour filter layer

Post by roberts-end »

I'm actually invetigating the interaction between ClearType and font rendering in various word processors. Some to use Windows font rendering API, other have their own bespoke code. There are many different frameworks For example WPF has two different font rendering routines. Even different releases of windows 10 have different Clear Type algorithms (it changed depending on single monitor or multi-monitor DPI settings.

Some routines manipulate the pixel colour to get the desired sub-pixel elements, others use the alpha chanel. Take a look at the 'n' in the photograph of the screen . On the right hand vertical edge the green elements are showing at reduced intensity (but definately not black). On the left side the red is slightly attenuated and the green is very nearly black. First step in the investigation is to see if I can use a screen grab to deduce what is actually happening at the sub-pixel level.

What you describe is simple grey scale antialiasing as implemented in Windows XP. Since then there have been at least two imlementations of ClearType and a lot of progress in font design.
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Help needed to make a masked colour filter layer

Post by Jean-Luc »

roberts-end wrote:I'm actually invetigating the interaction between ClearType and font rendering in various word processors.
Ok, I understand what your are trying to do. It's kind of reverse engineering. :)

The way pixels are displayed on screen is protected by patents, I think. You may find perhaps some technical information inside those patents. I don't know which are related to the text displayed on screen computers. The patents are often mentioned in the software that uses them.

In PaintShop Pro, you'll find them in 'About / Legal Info' under "Patents: http://www.corel.com/patent". This URL shows the patents for Corel's products.
When I ask Google to show the number 7006688 patent (found in the PaintShop Pro list), I get:
https://patents.google.com/patent/US7006688
https://patents.justia.com/patent/7006688
The PSP users who are coming from Jasc time will recognize one of the inventors: Kryzstof Antoni Zaklika who was a "PSP guru".
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Post Reply