I was using the famous Microsoft's "Windows API Code Pack" examples to extract Shell thumbnails from files.
The examples returns a bitmap of the thumbnail, and the problem is when the method returns a big Icon or dynamically generated folder thumbnail, those contains transparency information, and naively casting/converting this bitmap to image (like when displaying in picture box for instance), removes transparency information and making the background black.
Calling the standard .net method MakeTransparent() on bitmap resolve the issue partially, because it is considered only one color (black) as transparent, and does not account for different blending levels.
What is the precise way to convert the bitmaps preserving this alpha channel? if there is no simple method maybe I will need to brute analyze it pixel by pixel? if yes how exactly this should be done?