'Load image data based on tile list'

def load(self):

    pixel = Image.Image.load(self)
    if (self.tile is None):
        raise IOError('cannot    load    this    image')
    if (not self.tile):
        return pixel
    self.map = None
    use_mmap = (self.filename and (len(self.tile) == 1))
    use_mmap = (use_mmap and (not hasattr(sys, 'pypy_version_info')))
    readonly = 0
    try:
        read = self.load_read
        use_mmap = False
    except AttributeError:
        read = self.fp.read
    try:
        seek = self.load_seek
        use_mmap = False
    except AttributeError:
        seek = self.fp.seek
    if use_mmap:
        (decoder_name, extents, offset, args) = self.tile[0]
        if ((decoder_name == 'raw') and (len(args) >= 3) and (args[0] == self.mode) and (args[0] in Image._MAPMODES)):
            try:
                if hasattr(Image.core, 'map'):
                    self.map = Image.core.map(self.filename)
                    self.map.seek(offset)
                    self.im = self.map.readimage(self.mode, self.size, args[1], args[2])
                else:
                    import mmap
                    fp = open(self.filename, 'r')
                    size = os.path.getsize(self.filename)
                    self.map = mmap.mmap(fp.fileno(), size, access=mmap.ACCESS_READ)
                    self.im = Image.core.map_buffer(self.map, self.size, decoder_name, extents, offset, args)
                readonly = 1
                if self.palette:
                    self.palette.dirty = 1
            except (AttributeError, EnvironmentError, ImportError):
                self.map = None
    self.load_prepare()
    err_code = (-3)
    if (not self.map):
        self.tile.sort(key=_tilesort)
        try:
            prefix = self.tile_prefix
        except AttributeError:
            prefix = ''
        for (decoder_name, extents, offset, args) in self.tile:
            decoder = Image._getdecoder(self.mode, decoder_name, args, self.decoderconfig)
            seek(offset)
            decoder.setimage(self.im, extents)
            if decoder.pulls_fd:
                decoder.setfd(self.fp)
                (status, err_code) = decoder.decode('')
            else:
                b = prefix
                while True:
                    try:
                        s = read(self.decodermaxblock)
                    except (IndexError, struct.error):
                        if LOAD_TRUNCATED_IMAGES:
                            break
                        else:
                            raise IOError('image    file    is    truncated')
                    if (not s):
                        self.tile = []
                        decoder.cleanup()
                        if LOAD_TRUNCATED_IMAGES:
                            break
                        else:
                            raise IOError(('image    file    is    truncated    (%d    bytes    not    processed)' % len(b)))
                    b = (b + s)
                    (n, err_code) = decoder.decode(b)
                    if (n < 0):
                        break
                    b = b[n:]
            decoder.cleanup()
    self.tile = []
    self.readonly = readonly
    self.load_end()
    if (self._exclusive_fp and self._close_exclusive_fp_after_loading):
        self.fp.close()
    self.fp = None
    if ((not self.map) and (not LOAD_TRUNCATED_IMAGES) and (err_code < 0)):
        raise_ioerror(err_code)
    return Image.Image.load(self)
