I am writing a C # program. For this program, I painted a picture and cut out her background. However, when opening it through the PictureBox, a white background appears.
Question: Is it possible to somehow get around and remove the white background, so as not to spoil the program? Thank you in advance!
- Put Paint.NET ... - Qwertiy ♦
- Well, remove the background from the picture. And do not believe the Windows Photo Viewer - it does not show a white background, even if it is. - Qwertiy ♦
- maybe it displays a picture in a different format .. check the original picture format - Volodymyr
- Perhaps your form has a white background? - VladD
- I specifically checked it: I created a new file, deleted everything, drew some kind of zigzag on a transparent background, saved it in png; I created a new winforms application in C #, threw it onto the PictureBox form, put the code in Form_Load, assigned it the picture and launched it. The background is gray, like a shape, no white background appeared. Chyadt? - Qwertiy ♦
2 answers
In order for the background to be absent in the PictureBox, the picture must be without a background, for example, in PNG format, i.e. the image loaded into it must be with alpha channel, in which the background transparency is set. More specifically, the image format should be argb, 32 bits per pixel .
Here is a screenshot from my project, where a PNG image with transparency is loaded into PictureBox, and it is supported right away, without even setting up anything. The basic properties are also shown.
Accordingly, at the development stage and at startup, it looks like this: 
- Happened? Earned? - BlackWitcher
You background coincides with the form that's all. If you put the picture over a different background, you can see that it is not missing.
