def __init__(self, timeline, thumbnail_height=160): super(ImageTimelineRenderer, self).__init__(timeline, msg_combine_px=40.0) self.thumbnail_height = thumbnail_height self.thumbnail_combine_px = 20.0 # use cached thumbnail if it's less than this many pixels away self.min_thumbnail_width = 8 # don't display thumbnails if less than this many pixels across self.quality = Image.NEAREST # quality hint for thumbnail scaling self.thumbnail_cache = TimelineCache(self._load_thumbnail, lambda topic, msg_stamp, thumbnail: self.timeline.scene().update())