I was looking at making a little helper app for Windows that will take an image on your clipboard and ensure it is under 8MB for posting to discord, and if it isn't, use Pillow to resize it until it is the right size.
I can use Pillow's ImageGrab.grabclipboard() to get the image off the clipboard, but I am a little confused about writing it back. I have been back and forth between the pywin32 source and the windows docs for the windows C API, but I don't have any previous experience or context to know what some pieces are intended to do. I found an example to write to it from StackOverflow ( https://stackoverflow.com/questions/34322132/copy-image-to-clipboard), but I was wanting to dig a little deeper to see what formats other than BMP I could use to put on the clipboard. My ignorance of C++ and the Windows APIs and hell the Python C API is really biting me here. Is there a bit of an idiots example guide for how to say, put a PNG on the clipboard or a JPG? Some example code? There is a ton of useful info in the pywin32 repo, but I haven't found anything that has made this click for me. Thanks for any help! Andrew
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32