def snapshot(self, filename="tmp.png", quality=None):
        """
        Take a screenshot and save it to `tmp.png` filename by default

        Args:
            filename: name of file where to store the screenshot
            quality: ignored

        Returns:
            display the screenshot

        """
        w, h = self.get_current_resolution()
        dsp = display.Display()
        root = dsp.screen().root
        raw = root.get_image(0, 0, w, h, X.ZPixmap, 0xffffffff)
        image = Image.frombytes("RGB", (w, h), raw.data, "raw", "BGRX")
        from airtest.aircv.utils import pil_2_cv2
        image = pil_2_cv2(image)
        return image

        Take a screenshot and save it to `tmp.png` filename by default

        Args:
            filename: name of file where to store the screenshot
            quality: ignored

        Returns:
            display the screenshot

        
airtest/core/linux/linux.py