Revert 1102

Fixes: https://launchpad.net/bugs/667837
This commit is contained in:
Tim Bentley 2010-10-28 18:23:17 +01:00
parent 5d9ef61e2c
commit fff4cf1e1c

View File

@ -263,8 +263,9 @@ def resize_image(image, width, height, background=QtCore.Qt.black):
# and move it to the centre of the preview space # and move it to the centre of the preview space
new_image = QtGui.QImage(width, height, new_image = QtGui.QImage(width, height,
QtGui.QImage.Format_ARGB32_Premultiplied) QtGui.QImage.Format_ARGB32_Premultiplied)
new_image.fill(background)
painter = QtGui.QPainter(new_image) painter = QtGui.QPainter(new_image)
painter.fillRect(new_image.rect(), background) #painter.fillRect(new_image.rect(), background)
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview) painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
return new_image return new_image