This commit is contained in:
Tim Bentley 2010-10-26 20:11:26 +01:00
parent 54d99657ab
commit d3e4cf7a2d
1 changed files with 1 additions and 1 deletions

View File

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