def getStream(self):
        from PIL import Image, ImageDraw  # PIL dependency

        # Create an image and draw something on it.
        image = Image.new("RGB", (270, 270))
        drawable = ImageDraw.Draw(image)
        drawable.rectangle([0, 0, 270, 270], fill=str(Color.BLUE))
        drawable.rectangle([1, 1, 268, 268], fill=str(self._bgColor))
        drawable.ellipse([25, 25, 245, 245], fill=str(self._fgColor))
        drawable.text((50, 100),
                'r=' + str(self._fgColor.getRed()) +
                ',g=' + str(self._fgColor.getGreen()) +
                ',b=' + str(self._fgColor.getBlue()), fill=str(Color.BLACK))
        drawable.text((5, 15),
                'r=' + str(self._bgColor.getRed()) +
                ',g=' + str(self._bgColor.getGreen()) +
                ',b=' + str(self._bgColor.getBlue()), fill=str(Color.BLACK))

        del drawable

        try:
            # Write the image to a buffer.
            self._imagebuffer = StringIO()
            image.save(self._imagebuffer, 'PNG')
            return self._imagebuffer
        except __HOLE__:
            return None
dataset/ETHPy150Open rwl/muntjac/muntjac/addon/colorpicker/color_picker_application.py/MyImageSource.getStream