Code cleanups

This commit is contained in:
Tim Bentley 2010-10-15 16:37:29 +01:00
parent cef92476ad
commit f3646cf6e6
2 changed files with 0 additions and 10 deletions

View File

@ -228,13 +228,6 @@ def image_to_byte(image):
# use buffer to store pixmap into byteArray # use buffer to store pixmap into byteArray
buffie = QtCore.QBuffer(byte_array) buffie = QtCore.QBuffer(byte_array)
buffie.open(QtCore.QIODevice.WriteOnly) buffie.open(QtCore.QIODevice.WriteOnly)
# if isinstance(image, QtGui.QImage):
# log.debug(u'image_to_byte - image')
# #pixmap = QtGui.QPixmap.fromImage(image)
# pixmap = image
# else:
# log.debug(u'image_to_byte - pixmap')
# pixmap = QtGui.QPixmap(image)
image.save(buffie, "PNG") image.save(buffie, "PNG")
log.debug(u'image_to_byte - end') log.debug(u'image_to_byte - end')
# convert to base64 encoding so does not get missed! # convert to base64 encoding so does not get missed!

View File

@ -584,9 +584,6 @@ class SlideController(QtGui.QWidget):
else: else:
label = QtGui.QLabel() label = QtGui.QLabel()
label.setMargin(4) label.setMargin(4)
# pixmap = resize_image(frame[u'image'],
# self.parent.RenderManager.width,
# self.parent.RenderManager.height)
label.setScaledContents(True) label.setScaledContents(True)
label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image'])) label.setPixmap(QtGui.QPixmap.fromImage(frame[u'image']))
self.PreviewListWidget.setCellWidget(framenumber, 0, label) self.PreviewListWidget.setCellWidget(framenumber, 0, label)