Dear all,
I am trying in X11 to copy an image to clipboard but with out success.
here the code that I am using up to now
# image is a PIL image
image_buffer = io.BytesIO()
image.save(image_buffer, format="PNG")
image_buffer.seek(0)
window.clipboard_clear()
window.clipboard_append(image_buffer.read(), type="image/png", format="image/png")
I've tried to call cipboard_append with
image_buffer, image_buffer.getbuffer(), image_buffer.read(),
even save the data ina global variable to avoid being GC.
It always append too few data -> invalid image
Any ideas?