def render_img(self, buf, addr, mouse_offs): colors = [] for c in buf: c = ord(c) & 0xFF r, g, b = self.hm(c) colors.append(qRgb(r, g, b)) return colors