-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Winapi: Image should use CF_BITMAP? #1
Comments
I tried using the Bitmap format but it seems to me that it doesn't support alpha so I figured it's easier if I just re-implement that myself. The reason for me separating the clipboard opening and the data transfer is to be able to tell if the error was because the clipboard is being used or if it's because the data cannot be transferred. |
Yes, that's correct CF_BITMAP doesn't allow you to store alpha channel. |
Emulsion is 😁 |
Ah, I see. |
Thanks, should be useful for large image files. I opened #2 |
JFYI you can get image by using high level format type https://docs.rs/clipboard-win/4.0.2/clipboard_win/formats/struct.Bitmap.html
It is to be used within context of opened clipboard.
See Getter/Setter traits.
If you want you can add CF_DIB to code by making PR
There are also shortcut functions that open/close clipboard and get data to owned data structure if you don't need to efficiently re-use buffers https://docs.rs/clipboard-win/4.0.2/clipboard_win/fn.get_clipboard.html
The text was updated successfully, but these errors were encountered: