Skip to content

Commit

Permalink
Small bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Nov 21, 2024
1 parent e3bad90 commit d817d22
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion upcean/encode/codabar.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def encode_codabar_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/code11.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def encode_code11_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48,
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_print)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/code32.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def encode_code32_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48,
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
4 changes: 2 additions & 2 deletions upcean/encode/code39.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def encode_code39_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48,
LineTxtStartNorm += 15
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down Expand Up @@ -634,7 +634,7 @@ def encode_code39extended_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barhei
else:
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
barheight[0] * int(resize)), code39extended.get(upc_matches[NumTxtZero], upc_matches[NumTxtZero]), barcolor[1], "ocrb", imageoutlib)
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
4 changes: 2 additions & 2 deletions upcean/encode/code93.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def encode_code93_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48,
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down Expand Up @@ -636,7 +636,7 @@ def encode_code93extended_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barhei
else:
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
barheight[0] * int(resize)), code93extended.get(upc_matches[NumTxtZero], upc_matches[NumTxtZero]), barcolor[1], "ocrb", imageoutlib)
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/itf.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def encode_itf_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48, 54
while (NumTxtZero < len(upc_matches)):
ArrayDigit = list(upc_matches[NumTxtZero])
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/itf14.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def encode_itf14_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48,
while (NumTxtZero < len(upc_matches)):
ArrayDigit = list(upc_matches[NumTxtZero])
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/msi.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def encode_msi_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48, 54
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_print)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/plessey.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def encode_plessey_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down
2 changes: 1 addition & 1 deletion upcean/encode/stf.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def encode_stf_barcode(inimage, upc, resize=1, shiftxy=(0, 0), barheight=(48, 54
LineTxtStart += (1 * int(resize))
while (NumTxtZero < len(upc_matches)):
texthidden = False
if hidetext or (NumTxtZero == 0 and (hidesn is None or hidesn)) or (NumTxtZero == 11 and (hidecd is None or hidecd)):
if hidetext:
texthidden = True
if(not texthidden):
drawColorText(upc_img, 10 * int(resize * barwidth[1]), LineTxtStart * barwidth[0], vertical_text_fix + (
Expand Down

0 comments on commit d817d22

Please sign in to comment.