Skip to content

Commit

Permalink
return bytes, not BytesIO object for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
sumpfork committed Aug 10, 2018
1 parent 88690e0 commit b2c4851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions domdiv/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion domdiv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b2c4851

Please sign in to comment.