environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _insert_img(self, cursor, img, fmt):
        """ insert a raw image, jpg or png """
        try:
            image = QtGui.QImage()
            image.loadFromData(img, fmt.upper())
        except ValueError:
            self._insert_plain_text(cursor, 'Received invalid %s data.'%fmt)
        else:
            format = self._add_image(image)
            cursor.insertBlock()
            cursor.insertImage(format)
            cursor.insertBlock()
def _insert_img(self, cursor, img, fmt):
        try:
            image = QtGui.QImage()
            image.loadFromData(img, fmt.upper())
        except ValueError:
            self._insert_plain_text(cursor, 'Received invalid %s data.'%fmt)
        else:
            format = self._add_image(image)
            cursor.insertBlock()
            cursor.insertImage(format)
            cursor.insertBlock()
def _insert_img ( self , cursor , img , fmt ) : try : image = QtGui . QImage ( ) image . loadFromData ( img , fmt . upper ( ) ) except ValueError : self . _insert_plain_text ( cursor , 'Received invalid %s data.' % fmt ) else : format = self . _add_image ( image ) cursor . insertBlock ( ) cursor . insertImage ( format ) cursor . insertBlock ( )
insert a raw image, jpg or png
insert a raw image jpg or png