Get Clipboard Image Depth
Posted: Fri Jan 08, 2021 5:59 pm
The GetClipBoardImage() function offers a choice of colour depth, 24 or 32-bit. Is there a way to verify the colour depth of the image in the Clipboard first?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
If OpenClipboard_(0)
Debug GetClipboardData_(#CF_DIB) ; returns pointer to A memory object containing a BITMAPINFO structure followed by the bitmap bits.
Debug GetClipboardData_(#CF_DIBV5) ; A memory object containing a BITMAPV5HEADER structure followed by the bitmap color space information and the bitmap bits.
; other flags of GetClipboardData
; https://docs.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats
CloseClipboard_();
EndIf