I used code by this question and this is what I have:
from io import BytesIO
import win32clipboard
from PIL import Image
image = Image.open('image.jpg')
output = BytesIO()
image.convert('RGB').save(output, 'BMP')
data = output.getvalue()[14:]
output.close()
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardData(win32clipboard.CF_DIB, data)
win32clipboard.CloseClipboard()
now what should I do if I wanna copy the word 'hello' before the image go down one line and then the image
I tried doing this
win32clipboard.SetClipboardData(win32clipboard.CF_DIB,BytesIO(StringIO('hello_world' + '\n').read().encode('utf8')) + data)
but it gave me: TypeError: unsupported operand type(s) for +: '_io.BytesIO' and 'bytes'