Skip to content

Commit

Permalink
Update binary.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Nov 19, 2024
1 parent c848600 commit a8f40af
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion upcean/encode/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@
skimagesupport = upcean.support.check_for_skimage()
imagelibsupport = upcean.support.imagelibsupport
defaultdraw = upcean.support.defaultdraw
if(pilsupport or pillowsupport):
import upcean.predraw.prepil
if(cairosupport):
import upcean.predraw.precairo
if(qahirahsupport):
import upcean.predraw.preqahirah
if(svgwritesupport):
import upcean.predraw.presvgwrite
if(wandsupport):
import upcean.predraw.prewand
if(magicksupport):
import upcean.predraw.premagick


def get_binary_barcode_size(upc, resize=1, shiftxy=(0, 0), barheight=(48, 54), barwidth=(1, 1)):
Expand Down Expand Up @@ -195,5 +207,5 @@ def create_binary_barcode(upc, outfile="./binary.png", resize=1, barheight=(48,
else:
if(imagecomment is None):
imagecomment = upc['type']+"; "+upc['upc']
return upcean.predraw.save_to_file([upc_img, upc_preimg], outfile, outfileext, imagecomment)
return pcean.predraw.save_to_file([upc_img, upc_preimg], outfile, outfileext, imagecomment, imageoutlib)
return True

0 comments on commit a8f40af

Please sign in to comment.