我只是想知道,python 中的 tkinter 是否有任何方法可以使用鼠标调整/重新缩放图片的大小(类似于如何在 google docs 中重新缩放图像)?我到目前为止的代码:
def addImage(self, docx):
filename = filedialog.askopenfile(title="Select a file")
myImage = ImageTk.PhotoImage(Image.open(filename.name))
position = docx.index(INSERT)
docx.image_create(position, image=myImage)
docx.photo = myImage
# here I want to be able to resize the image I have put in my document with the mouse
Run Code Online (Sandbox Code Playgroud)
提前致谢