コード例 #1
0
 def save(self, fileobj, format):
     format_object = get_format(format)
     if not format_object:
         raise FormatNotSupported(format)
     format_object.save(self, fileobj)
コード例 #2
0
 def open(cls, fileobj):
     for format in get_format_objects():
         image = format.open(fileobj)
         if image:
             return image
     raise FormatNotSupported()
コード例 #3
0
def encode(image, fileobj):
    raise FormatNotSupported('jpeg')