I have found following code that copies an image to the windows clipboard
memory = io.BytesIO()
# Here img is PilImage object
img.convert('RGB')
img.save(memory, format='bmp')
data = memory.getvalue()[14:]
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardData(win32clipboard.CF_DIB, data)
win32clipboard.CloseClipboard()
But I wanted to copy an image to clipboard using python despite of any platform. How can I do it ? Is there any library available?