c# Transparency in jpg shows black, not transparent

moondaddy 896 Reputation points
2021-12-05T22:22:01.547+00:00

In a .net 4.8 console app I need to make an area of a jpg file transparent, but when I do, it shows black, not transparent, and I cannot use png file format.

var graphic = Graphics.FromImage(thumbnail);
graphic.Clear(Color.Transparent);

Any idea who to resolve this?

Thanks.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,936 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful