Skip to content

Instantly share code, notes, and snippets.

@andrisgauracs
Created January 10, 2019 23:00
Show Gist options
  • Select an option

  • Save andrisgauracs/f56436fa33a8909f162067fa0357dc28 to your computer and use it in GitHub Desktop.

Select an option

Save andrisgauracs/f56436fa33a8909f162067fa0357dc28 to your computer and use it in GitHub Desktop.
# To show a thumbnail version of this image, we need to store it
# in a pixmap and then add it to a label widget
pixmap = QtGui.QPixmap()
pixmap.load(imagePath)
pixmap = pixmap.scaledToWidth(50)
self.imageBoxes[framesTaken].setPixmap(pixmap)
framesTaken = framesTaken + 1
# Now that we have at least one image captured and processed,
# we can go ahead and show the bottom layout with our thumbnail labels
self.imageareaWidget.setVisible(1)
self.valuechange()
# Let's now add the full size image to a list of all captured images
framesTakenList.append(imagePath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment