Example #1
0
    def to_buffer_rgb(self):
        image = self.image

        if image.mode != 'RGB':
            image = image.convert('RGB')

        return RGBImageBuffer(image.size, image.tobytes())
Example #2
0
    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())
Example #3
0
 def to_buffer_rgba(self):
     return RGBImageBuffer(self.image.size, self.image.make_blob('RGBA'))