Qt中如何对PNG进行抗锯齿缩放?
在一个基于PyQt的图形界面程序中,我在调整大小后绘制了一些PNG文件作为QPixmap。基本上,事情是这样的:
bitmap = QPixmap( "foo.png" )
bitmap.scaleToHeight(38) # original is larger than this
scene.addItem(QGraphicsPixmapItem(bitmap)) # Add to graphics scene
问题是:之后,图像看起来很糟糕。有办法让这个过程变得更平滑吗?