def load_memory(self, data, ext, filename='__inline__'):
        '''(internal) Method to load an image from raw data.
        '''
        self._filename = filename

        # see if there is a available loader for it
        loaders = [loader for loader in ImageLoader.loaders if
                   loader.can_load_memory() and
                   ext in loader.extensions()]
        if not loaders:
            raise Exception('No inline loader found to load {}'.format(ext))
        image = loaders[0](filename, ext=ext, rawdata=data, inline=True,
                nocache=self._nocache, mipmap=self._mipmap,
                keep_data=self._keep_data)
        if isinstance(image, Texture):
            self._texture = image
            self._size = image.size
        else:
            self.image = image
dataset/ETHPy150Open kivy/kivy/kivy/core/image/__init__.py/Image.load_memory/original