def METHOD_NAME(self, numbered=True, compress="lossless"):
    if numbered:
        output_path = "{}.{}.png".format(self.output_prefix, self.number)
    else:
        output_path = "{}.png".format(self.output_prefix)
    thumbnail_path = output_path.replace(".png", "-thumb.png")
    # take screenshot with scrot
    subprocess.call(["scrot", "-o", "-t", self.geometry, output_path])
    # only keep the thumbnail
    os.rename(thumbnail_path, output_path)
    # compress PNG (only if pngquant is available)
    if compress:
        self.compress(compress, output_path)
    # add this path to the animation command
    self.output_paths.append(output_path)
    self.number += 1