Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Nov 16, 2024
1 parent b93f47e commit 1caabe6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion upcean/predraw/premagick.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ def save_to_file(inimage, outfile, outfileext, imgcomment="barcode"):

# Handle output destinations
if isinstance(outfile, file) or isinstance(outfile, IOBase):
upc_img.write(outfile) # Save to a file-like object
blob = Blob()
upc_img.write(blob)
data = blob.data
outfile.write(data) # Save to a file-like object
else:
upc_img.write(outfile) # Save to a file path

Expand Down

0 comments on commit 1caabe6

Please sign in to comment.