Creating PySide QPixMap from PIL Image

import sys
import PySide
sys.modules['PyQt4'] = PySide
import Image
import ImageQt
image = Image.open(blah)
# manipulate image
QPixmap(ImageQt.ImageQt(image))

ImageQt is a class provided by PIL that is hardcoded to use PyQt4. This lets you switch the module used by ‘PyQt4’

Source

Like what you read? Give xster a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.