@cached_property
    def image(self):

        if sys.version < '3':
            imageio = StringIO.StringIO(self._image_data)
        else:
            imageio = StringIO.BytesIO(self._image_data)

        try:
            source_image = PILImage.open(imageio)
            img = PILImage.new('RGBA', source_image.size, (0, 0, 0, 0))

            if source_image.mode == 'L':
                alpha = source_image.split()[0]
                transparency = source_image.info.get('transparency')
                mask = PILImage.eval(alpha, lambda a: 0 if a == transparency else 255)
                img.paste(source_image, (0, 0), mask=mask)
            else:
                img.paste(source_image, (0, 0))
        except IOError, e:
            raise PILUnavailableError(e.args[0].split()[1])
        finally:
            imageio.close()

        self.original_width, self.original_height = img.size

        # Crop the image searching for the smallest possible bounding box
        # without losing any non-transparent pixel.
        # This crop is only used if the crop flag is set in the config.
        if self.config['crop']:
            img = img.crop(img.split()[-1].getbbox())
        return img
Proxy to :class:`gcloud.datastore.query.Query`.
dataset/ETHPy150Open jorgebastida/glue/glue/core.py/Image.image--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/datastore/client.py/Client.query