I have been trying to copy an image to the windows clipboard and then paste it to a canvas on my form. It is working with BMP images but I also want it to work for JPEGs. I have an algorithm that can convert from JPG to BMP.
When I copy a JPG file, I found out that the type of data stored in the clipboard is "text/uri" which I think is the address of the image. The clipboard format is CF_HDROP which I found out is an array of characters storing a series of strings, each string terminated by the null character and the final string terminated by a double null character.
I am trying to get this text from the clipboard using Clipboard.AsText but I only get an empty string. I assume this is because there is a null charater terminating it, rather than a double null specifying the end of the character array. How can I get the full array of characters thereby getting the address of the image?
I got the CF_HDROP info from:
When I copy a JPG file, I found out that the type of data stored in the clipboard is "text/uri" which I think is the address of the image. The clipboard format is CF_HDROP which I found out is an array of characters storing a series of strings, each string terminated by the null character and the final string terminated by a double null character.
I am trying to get this text from the clipboard using Clipboard.AsText but I only get an empty string. I assume this is because there is a null charater terminating it, rather than a double null specifying the end of the character array. How can I get the full array of characters thereby getting the address of the image?
I got the CF_HDROP info from: