My application should be able to copy 32-bit images (RGB + alpha channel) to the clipboard and paste these images from the clipboard. For this I plan to use CF_DIBV5>
I was stuck on this problem for a while despite the detailed main answer. It would not seem to preserve alpha (even through a clipboard viewer).
It turns out, the solution is as simple as this:
CF_DIB
(no need for V5) with 32-bit pre-multiplied alpha"PNG"
format
With that, it seemed to be able to paste in all applications I tested (Paint.NET, GIMP, LibreOffice, and so forth).Essentially, as long as alpha was pre-multiplied, alpha was preserved in CF_DIB
in almost every program I used. In a rare one-off case, "PNG"
was needed.
To be clear: CF_DIBV5
was not needed.