Get Clipboard Image Depth
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Get Clipboard Image Depth
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?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Get Clipboard Image Depth
I'm not sure and didn't used it, but maybe it is possible using WinAPI.
Like this example, it returns bitmap headers from clipboard.
So if possible should be somewhere here.
Like this example, it returns bitmap headers from clipboard.
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
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Get Clipboard Image Depth
...That's most interesting Lunasole, I will have a dig at it, thanks.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.