Skip to content

Use dibv5 bitmap format for clipboard.#29

Open
nkrapivin wants to merge 1 commit intotoehead2001:masterfrom
nkrapivin:clipboard-dibv5
Open

Use dibv5 bitmap format for clipboard.#29
nkrapivin wants to merge 1 commit intotoehead2001:masterfrom
nkrapivin:clipboard-dibv5

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