def to_png(self): bmps = list(sorted(self.bitmaps, key=lambda x: len(x))) bmp = bmps[-1] return to_png(bmp)