How to convert "almost" white pixels into white pixels?

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
pstein
Posts: 110
Joined: Wed Dec 28, 2011 7:09 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: PSP X2
Location: Germany/Canada

How to convert "almost" white pixels into white pixels?

Post by pstein »

Assume I scanned a page from a paper-based News magazine with a Flatbedscanner.
The page contains mostly black/white and colored text and lines but also colored photos.

The scan quality is good but could be better.

As a first step I can improve it by applying some Brightness and Contrast operations.
It works but there is still some room for more improvements.

Particularly the pixels between the letters are not really white but only "almost" white.
They are some sort of light grey or light blue.

I would like to convert them to really pure bold white pixels.

So what I need is a way in Paint Shop Pro to define a threshold (e.g. color of pixel has a 2% distance to pure white) and tell PSP to convert all those pixel to white,
All other pixels should remain untouched.

How can I achieve this?

Peter
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: How to convert "almost" white pixels into white pixels?

Post by LeviFiction »

The anti-aliasing you're talking about is what makes it look smooth.

You can use the magic wand tool set a decent tolerance that selects the pixels you want, make sure "contiguous" is turned off so it'll select all matching pixels in the entire image. Grab the fill tool and fill with White.

Or

You could try just using the fill tool without any selection, and do the same thing. Turn off contiguous, set the tolerance, and fill the whole area with white it should only fill the areas that are close enough to white.
https://levifiction.wordpress.com/
Andy2011
Posts: 115
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: How to convert "almost" white pixels into white pixels?

Post by Andy2011 »

About 18 months ago I had a slightly different problem of scanning in 70 high contrast black & white prints usuing a fairly basic printer-scanner. Some of the detail in the pictures was not showing up and I tried a lot of adjustments in PSP but with limited success.
Ultimately I got close to what I wanted by scanning each print 3 times at different settings (high, medium & low brightness) then merging the images using PSP's HDR process. The resultant 16 bit tiffs, even when reduced to jpegs and viewed on a normal definition monitor (3x8 bit), had a lot more detail.
Whilst this method may not work for your project, it may be worth trying as it gives PSP a lot more information to work with. The automatic HDR process was much better at balancing the brightness levels than my attempts.
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: How to convert "almost" white pixels into white pixels?

Post by migf1 »

An example if possible of the image to be corrected would help. Depending on the content, you may also use levels or curves to target specific tone ranges and either darken or brighten them. Maybe use masks too, or plain selections modified for smoother edges, etc.
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
pstein
Posts: 110
Joined: Wed Dec 28, 2011 7:09 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: PSP X2
Location: Germany/Canada

Re: How to convert "almost" white pixels into white pixels?

Post by pstein »

LeviFiction wrote: Mon Feb 08, 2021 7:37 am The anti-aliasing you're talking about is what makes it look smooth.

You can use the magic wand tool set a decent tolerance that selects the pixels you want, make sure "contiguous" is turned off so it'll select all matching pixels in the entire image. Grab the fill tool and fill with White.
This looks good.

As I found out I have to disable "anti-aliasing" checkbox.

A related question:

What does "Feather" value mean?
I tried some values but all of them yield strange selections.
So 0 seems to be the only recommended value for my purpose.

But for which scenario is this useful?

Whats the difference to "Tolerance"?
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: How to convert "almost" white pixels into white pixels?

Post by migf1 »

pstein wrote: Tue Feb 09, 2021 8:55 am ...
A related question:

What does "Feather" value mean?
I tried some values but all of them yield strange selections.
So 0 seems to be the only recommended value for my purpose.

But for which scenario is this useful?

Whats the difference to "Tolerance"?
Feather causes the selection edges to gradually fade.

Tolerance determines what will be selected (how far the selection will go) depending on the current Match Mode. For example, using the Magic Wand with Match Mode set to Color and Tolerance to 0, will select only those pixels that have the exact same color (hue & saturation) with the pixel you initially clicked on. If you increase the tolerance, pixels with a similar color to the initially clicked pixel will also get selected.

There is not a single rule of thumb really, since it depends on the quality of the image (size, resolution, color-depth, etc) and the effect you are going for.
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
Post Reply