本文整理汇总了Python中snapshot.Snapshot.snapshot方法的典型用法代码示例。如果您正苦于以下问题:Python Snapshot.snapshot方法的具体用法?Python Snapshot.snapshot怎么用?Python Snapshot.snapshot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类snapshot.Snapshot
的用法示例。
在下文中一共展示了Snapshot.snapshot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: snapshot
# 需要导入模块: from snapshot import Snapshot [as 别名]
# 或者: from snapshot.Snapshot import snapshot [as 别名]
def snapshot(self, options):
gp = GitParser()
sn = Snapshot()
image_path = sn.snapshot()
im = ImageManipulator(image_path)
im.add_text(gp.get_message('-1'), ImageManipulator.POSITION_BOTTOMLEFT,
self.font_file, self.font_size)
im.add_text(gp.get_hash('-1')[:10], ImageManipulator.POSITION_TOPRIGHT,
self.font_file, self.font_size)
im.save(self._get_snapshot_destination(options.destination))
示例2: snapshot
# 需要导入模块: from snapshot import Snapshot [as 别名]
# 或者: from snapshot.Snapshot import snapshot [as 别名]
def snapshot(self, options):
self._load_repository_settings()
gp = GitParser()
sn = Snapshot(int(options.delay), options.device,
int(options.skip_frames))
image_path = sn.snapshot()
im = ImageManipulator(image_path)
im.resize(options.image_size)
im.add_text(gp.get_message('-1'), ImageManipulator.POSITION_BOTTOMLEFT,
self.font_file, self.font_size)
im.add_text(gp.get_hash('-1')[:10], ImageManipulator.POSITION_TOPRIGHT,
self.font_file, self.font_size)
im.save(self._get_snapshot_destination(options.destination))