Remove Color background

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
baobab
Posts: 4
Joined: Wed Mar 26, 2014 9:47 am

Remove Color background

Post by baobab »

My monthly waterbill is emailed to me in gif format therefore I cannot print it. It has a BLUE background which must be removed so I can print it in black ONLY.

What format should I convert it to and HOW do i get it in black and white ONLY?

Thank you,

baobab
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Remove Color background

Post by cday »

baobab wrote:My monthly waterbill is emailed to me in gif format ... It has a BLUE background which must be removed ...
HOW do i get it in black and white ONLY?
If the background is a light blue try XnView Classic: Image > Convert to Binary...

If that doesn't solve the problem the following more flexible method should:

Image > Adjust > Levels...

Select 'Apply to image'

Move the right hand slider towards the centre until the background is white, then adjust the left hand slider as necessary.
baobab wrote:What format should I convert it to ...
You should be able to print a gif directly from XnView but if you can't try: File > Save as... jpg or png or pdf .

[Edited]
baobab
Posts: 4
Joined: Wed Mar 26, 2014 9:47 am

Re: Remove Color background

Post by baobab »

Thanks cday!

I'll try your suggestions.
If you would like to experiment for the best solution to my problem, I've tried to attach a sample, and hope you can retrieve it.

Kind regards,
baobab
problem gif
problem gif
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Remove Color background

Post by cday »

The dark blue does complicate things a little, and the bill appears to have been printed using a low-tech dot matrix printer which doesn't help, and the image pixel dimensions are quite small...

But to show you that it is possible, I'm ataching the result of a quick test that used a series of operations too experimental to document immediately, but I'll do some more tests later and post again.
MARCH~DMCe1.png
MARCH~DMCe1.png (41.57 KiB) Viewed 4037 times
A challenge for anyone else with time to spare...

Edit:

Is that a paper bill that has been scanned -- if so, could you try scanning it again at a higher resolution to improve the quality?

Otherwise, could you make a test print and see if my initial image is usable?
baobab
Posts: 4
Joined: Wed Mar 26, 2014 9:47 am

Re: Remove Color background

Post by baobab »

Thanks a lot cday!

No scan - that is the attachment they send with their monthly email notification, in stead of posting a hard copy in the mail.
Regards,
baobab
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Remove Color background

Post by cday »

Have you tried printing the above black and white version, is it what you hoped for or -- given the low quality of the blue original -- does is not really look practical to print out your bills?

Edit:

Here's another one: The file size has increased substantially, which I imagine is of no concern to you, because I've resampled the orignal blue image to higher resolution, and also because of the shades of gray which I've left in.

The question is whether this is worth persuing if you will have to carry out a series of operations on each bill you receive?

And it probably depends to some extent on the printer you are using.
Attachments
MARCH~DMCe2.png
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Remove Color background

Post by XnTriq »

cday wrote:A challenge for anyone else with time to spare...
Here's my stab at it in as few steps as possible:
  1. Image » Convert to Grey » 256 Grey scale
  2. Image » Adjust » Levels » Black point: 153 / White point: 204
Attachments
p118704.png
cday
XnThusiast
Posts: 4396
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Remove Color background

Post by cday »

And...

3. Filter >> Effects >> Enhance -- (one of the Focus options)

You posted about it yesterday and it really is amazingly effective...

Why don't you post an image?
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Remove Color background

Post by XnTriq »

cday wrote:Why don't you post an image?
Updated!

Edit: You're right, applying one of these filters does increase readability (and decreases color count plus file size) :-)
  1. Image » Convert to Grey » 256 Grey scale
  2. Image » Adjust » Levels » Black point: 153 / White point: 204
  3. Filter » Effects... » Enhance » Enhance Focus
Attachments
p118710.png
Post Reply