return bytes, not BytesIO object for preview
This commit is contained in:
parent
88690e0150
commit
b2c4851b68
@ -28,6 +28,7 @@ class DividerDrawer(object):
|
||||
def __init__(self):
|
||||
self.odd = True
|
||||
self.canvas = None
|
||||
self.options = None
|
||||
|
||||
@staticmethod
|
||||
def get_image_filepath(fname):
|
||||
|
||||
@ -512,7 +512,7 @@ def generate_sample(options):
|
||||
with Image(blob=buf.getvalue(), resolution=options.preview_resolution) as sample:
|
||||
sample.format = 'png'
|
||||
sample.save(sample_out)
|
||||
return sample_out
|
||||
return sample_out.getvalue()
|
||||
|
||||
|
||||
def parse_papersize(spec):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user