Creating PySide QPixMap from PIL Image

xster
xster
Published in
1 min readNov 20, 2012
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

--

--