framebuffer.py 文件源码

python
阅读 74 收藏 0 点赞 0 评论 0

项目:luma.core 作者: rm-hull 项目源码 文件源码
def redraw_required(self, image):
        """
        Calculates the difference from the previous image, return a boolean
        indicating whether a redraw is required. A side effect is that
        ``bounding_box`` and ``image`` attributes are updated accordingly, as is
        priming :py:func:`getdata`.

        :param image: An image to render
        :type image: PIL.Image.Image
        :returns: ``True`` or ``False``
        """
        self.bounding_box = ImageChops.difference(self.image, image).getbbox()
        if self.bounding_box is not None:
            self.image = image.copy()
            return True
        else:
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号