Skip to content

Conversation

@nkrapivin
Copy link

@nkrapivin nkrapivin commented Nov 12, 2022

Fixes transparent background when pasting an image from clipboard in some apps by providing a DIBV5 format image as a secondary option.

(the only app where this doesn't seem to work is Telegram Desktop, Qt has some weird quirks regarding DIBV5 and it will still prefer the "PNG" version with broken alpha)

Also the native Clipboard class does not support DIBV5 natively (it tries to make a "Compatible" DIB with broken alpha) so I used DllImport.

Example pasted from clipboard:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant