def to_buffer_rgb(self): image = self.image if image.mode != 'RGB': image = image.convert('RGB') return RGBImageBuffer(image.size, image.tobytes())
def to_buffer_rgb(self): if self.has_animation(): pass # TODO: Raise warning image = self.image if image.mode != 'RGB': image = image.convert('RGB') return RGBImageBuffer(image.size, image.tobytes())
def to_buffer_rgba(self): return RGBImageBuffer(self.image.size, self.image.make_blob('RGBA'))