How to remove white background from a bitmap

I want to remove the white background color in the bitmap

Bitmap capcha = new Bitmap("C:/image.jpg"); pictureBox1.Image = capcha; 

but I want to display in my pictureBox1 only an image without white that exists in the background

+4
source share
1 answer

try setting transparency in capcha as follows:

 Bitmap capcha = new Bitmap(@"C:/image.jpg"); capcha.MakeTransparent(Color.White); pictureBox1.Image = capcha; 

Hope this is what you need.

+11
source

Source: https://habr.com/ru/post/1468867/


All Articles