def loadNewSceneImage(self, imageinfo):
    '\n        Create a new scene image from the information given in this\n        and subsequent dictionaries imageinfo.  The image is created\n        from multiple calls to this function since there is a limit\n        on the size of a single object passed through a pipe.\n        \n        The first imageinfo dictionary given when creating an image\n        must define the following key and value pairs:\n            "width": width of the image in pixels\n            "height": height of the image in pixels\n            "stride": number of bytes in one line of the image\n                      in the bytearray\n        The scene image data is initialized to all zero (transparent)\n        at this time.\n\n        This initialization call must be followed by (multiple) calls\n        to this method with imageinfo dictionaries defining the key\n        and value pairs:\n            "blocknum": data block number (1, 2, ... numblocks)\n            "numblocks": total number of image data blocks\n            "startindex": index in the bytearray of image data\n                          where this block of image data starts\n            "blockdata": this block of data as a bytearray\n\n        On receipt of the last block of data (blocknum == numblocks)\n        the scene image will be created and the scene will be updated. \n\n        Raises:\n            KeyError - if one of the above keys is not given\n            ValueError - if a value for a key is not valid\n        '
    if (not self.__loadingimage):
        myimgwidth = int(imageinfo['width'])
        myimgheight = int(imageinfo['height'])
        myimgstride = int(imageinfo['stride'])
        if ((myimgwidth < self.__minsize) or (myimgheight < self.__minsize)):
            raise ValueError(('image width and height cannot be less than %s' % str(self.__minsize)))
        if (myimgstride != (4 * myimgwidth)):
            raise ValueError('image stride is not four times the image width')
        self.__scenedata = bytearray((myimgstride * myimgheight))
        self.__scenewidth = myimgwidth
        self.__sceneheight = myimgheight
        self.__loadingimage = True
        QApplication.setOverrideCursor(Qt.WaitCursor)
        self.statusBar().showMessage(self.tr('Loading new image'))
        return
    myblocknum = int(imageinfo['blocknum'])
    mynumblocks = int(imageinfo['numblocks'])
    mystartindex = int(imageinfo['startindex'])
    myblockdata = imageinfo['blockdata']
    if ((myblocknum < 1) or (myblocknum > mynumblocks)):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid image data block number or number of blocks')
    if ((mystartindex < 0) or (mystartindex >= len(self.__scenedata))):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid start index for an image data block')
    myblocksize = len(myblockdata)
    myendindex = (mystartindex + myblocksize)
    if ((myblocksize < 1) or (myendindex > len(self.__scenedata))):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid length of an image data block')
    self.statusBar().showMessage(self.tr(('Loading new image (block %s of %s)' % (str(myblocknum), str(mynumblocks)))))
    self.__scenedata[mystartindex:myendindex] = myblockdata
    if (myblocknum == mynumblocks):
        self.__loadingimage = False
        self.statusBar().showMessage(self.tr('Creating new image'))
        try:
            self.__sceneimage = QImage(self.__scenedata, self.__scenewidth, self.__sceneheight, QImage.Format_ARGB32_Premultiplied)
            self.statusBar().showMessage(self.tr('Drawing new image'))
            self.updateScene()
        finally:
            self.statusBar().clearMessage()
            QApplication.restoreOverrideCursor()
Create a new scene image from the information given in this
and subsequent dictionaries imageinfo.  The image is created
from multiple calls to this function since there is a limit
on the size of a single object passed through a pipe.

The first imageinfo dictionary given when creating an image
must define the following key and value pairs:
    "width": width of the image in pixels
    "height": height of the image in pixels
    "stride": number of bytes in one line of the image
              in the bytearray
The scene image data is initialized to all zero (transparent)
at this time.

This initialization call must be followed by (multiple) calls
to this method with imageinfo dictionaries defining the key
and value pairs:
    "blocknum": data block number (1, 2, ... numblocks)
    "numblocks": total number of image data blocks
    "startindex": index in the bytearray of image data
                  where this block of image data starts
    "blockdata": this block of data as a bytearray

On receipt of the last block of data (blocknum == numblocks)
the scene image will be created and the scene will be updated. 

Raises:
    KeyError - if one of the above keys is not given
    ValueError - if a value for a key is not valid
def loadNewSceneImage(self, imageinfo):
    '\n        Create a new scene image from the information given in this\n        and subsequent dictionaries imageinfo.  The image is created\n        from multiple calls to this function since there is a limit\n        on the size of a single object passed through a pipe.\n        \n        The first imageinfo dictionary given when creating an image\n        must define the following key and value pairs:\n            "width": width of the image in pixels\n            "height": height of the image in pixels\n            "stride": number of bytes in one line of the image\n                      in the bytearray\n        The scene image data is initialized to all zero (transparent)\n        at this time.\n\n        This initialization call must be followed by (multiple) calls\n        to this method with imageinfo dictionaries defining the key\n        and value pairs:\n            "blocknum": data block number (1, 2, ... numblocks)\n            "numblocks": total number of image data blocks\n            "startindex": index in the bytearray of image data\n                          where this block of image data starts\n            "blockdata": this block of data as a bytearray\n\n        On receipt of the last block of data (blocknum == numblocks)\n        the scene image will be created and the scene will be updated. \n\n        Raises:\n            KeyError - if one of the above keys is not given\n            ValueError - if a value for a key is not valid\n        '
    if (not self.__loadingimage):
        myimgwidth = int(imageinfo['width'])
        myimgheight = int(imageinfo['height'])
        myimgstride = int(imageinfo['stride'])
        if ((myimgwidth < self.__minsize) or (myimgheight < self.__minsize)):
            raise ValueError(('image width and height cannot be less than %s' % str(self.__minsize)))
        if (myimgstride != (4 * myimgwidth)):
            raise ValueError('image stride is not four times the image width')
        self.__scenedata = bytearray((myimgstride * myimgheight))
        self.__scenewidth = myimgwidth
        self.__sceneheight = myimgheight
        self.__loadingimage = True
        QApplication.setOverrideCursor(Qt.WaitCursor)
        self.statusBar().showMessage(self.tr('Loading new image'))
        return
    myblocknum = int(imageinfo['blocknum'])
    mynumblocks = int(imageinfo['numblocks'])
    mystartindex = int(imageinfo['startindex'])
    myblockdata = imageinfo['blockdata']
    if ((myblocknum < 1) or (myblocknum > mynumblocks)):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid image data block number or number of blocks')
    if ((mystartindex < 0) or (mystartindex >= len(self.__scenedata))):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid start index for an image data block')
    myblocksize = len(myblockdata)
    myendindex = (mystartindex + myblocksize)
    if ((myblocksize < 1) or (myendindex > len(self.__scenedata))):
        self.statusBar().clearMessage()
        QApplication.restoreOverrideCursor()
        raise ValueError('invalid length of an image data block')
    self.statusBar().showMessage(self.tr(('Loading new image (block %s of %s)' % (str(myblocknum), str(mynumblocks)))))
    self.__scenedata[mystartindex:myendindex] = myblockdata
    if (myblocknum == mynumblocks):
        self.__loadingimage = False
        self.statusBar().showMessage(self.tr('Creating new image'))
        try:
            self.__sceneimage = QImage(self.__scenedata, self.__scenewidth, self.__sceneheight, QImage.Format_ARGB32_Premultiplied)
            self.statusBar().showMessage(self.tr('Drawing new image'))
            self.updateScene()
        finally:
            self.statusBar().clearMessage()
            QApplication.restoreOverrideCursor()