3

I'm painting an image in a QPainter object with:

QPainterObject.drawImage(QtCore.QPoint(0, 0), image)

The image itself is huge, (12.000 x 25.000 pixels).

When I scale the picture near it's "original" scale everything is fine, but when I reduce its size, white pixels start appearing all over the image. I understand it's an interpolation problem and I've tried setting up the render hints:

        QPainterobject.setRenderHints(QtGui.QPainter.Antialiasing,QtGui.QPainter.SmoothPixmapTransform)

But it makes no difference in the end result.

Is there another way to render better the scaled image? The scaling algorithm is doing probably nearest neighbour approach but I want interpolation.

0 Answers0