def save_rgb_image_as_file(self, filepath, format='png', quality=90):
        if not have_PIL:
            raise ImageViewCvError("Please install PIL to use this method")
        if self.surface is None:
            raise ImageViewCvError("No CV surface defined")

        with open(filepath, 'w') as out_f:
            self.get_rgb_image_as_buffer(output=out_f, format=format,
                                          quality=quality)
        self.logger.debug((format, filepath) % "wrote %s file '%s'")
dataset/ETHPy150Open ejeschke/ginga/ginga/cvw/ImageViewCv.py/ImageViewCv.save_rgb_image_as_file/swapped operands of `%`