File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -573,6 +573,8 @@ def from_bytes(klass, bytestring):
573
573
bstring : bytes
574
574
Byte string containing the on-disk representation of an image
575
575
"""
576
+ if len (klass .files_types ) > 1 :
577
+ raise NotImplementedError ("from_bytes is undefined for multi-file images" )
576
578
bio = io .BytesIO (bytestring )
577
579
file_map = klass .make_file_map ({'image' : bio , 'header' : bio })
578
580
return klass .from_file_map (file_map )
@@ -590,6 +592,8 @@ def to_bytes(self):
590
592
bytes
591
593
Serialized image
592
594
"""
595
+ if len (self .__class__ .files_types ) > 1 :
596
+ raise NotImplementedError ("to_bytes() is undefined for multi-file images" )
593
597
bio = io .BytesIO ()
594
598
file_map = self .make_file_map ({'image' : bio , 'header' : bio })
595
599
self .to_file_map (file_map )
You can’t perform that action at this time.
0 commit comments