Python Tkinter按钮图像在Windows上看起来很难看,但在Linux上看不到

Python Tkinter按钮图像在Windows上看起来很难看,但在Linux上看不到,python,image,user-interface,tkinter,Python,Image,User Interface,Tkinter,我目前正在开发tkinter GUI,tkinter按钮图像质量有问题 当我在LinuxUbuntu18.04上运行代码时,图像非常漂亮,而当我在Windows10上运行它们时,图像更难看 可以肯定的是,我在同一个屏幕上检查了这个问题,结果发现它不是问题的原因 下面是我如何对图像按钮进行编码的: photo = PhotoImage(file = "pictures/ball.png") resized_photo=photo.subsample(x=int(screen_w

我目前正在开发tkinter GUI,tkinter按钮图像质量有问题

当我在LinuxUbuntu18.04上运行代码时,图像非常漂亮,而当我在Windows10上运行它们时,图像更难看

可以肯定的是,我在同一个屏幕上检查了这个问题,结果发现它不是问题的原因

下面是我如何对图像按钮进行编码的:

photo = PhotoImage(file = "pictures/ball.png")
resized_photo=photo.subsample(x=int(screen_width / (167 * scale_factor_square)),
                                                    y=int(screen_width / (167 * scale_factor_square)))

New_Championship_button = Button(
            fenetre_accueil, bg='black', image=resized_photo, activebackground="white", bd=0, highlightthickness = 0, command=lambda: create_new_championship())
    New_Championship_button.configure(height=int(screen_height/28*1.77), width=int(screen_width/28))
以下是两张照片:

在Windows上:

在Linux上:


感谢您的帮助:)

当我在Linux ubuntu 18.04上运行代码时,图像非常漂亮,而当我在windows 10上运行它们时,图像更难看。
–请给我们看一些图像我刚刚编辑了问题可能
子样本()
在Linux和Windows中不使用相同的算法,或者您正在使用不同版本的tcl/tk。您可以尝试使用不同的库调整图片大小,例如,
当我在Linux ubuntu 18.04上运行代码时,图像非常漂亮,而当我在windows 10上运行它们时,图像更难看。
–请给我们看一些图像我刚刚编辑了问题可能
子样本()
在Linux和Windows中不使用相同的算法,或者您正在使用不同版本的tcl/tk。您可以尝试使用其他库调整图片大小,例如。