1
0
Fork
You've already forked python-barcode
0

Barcode lines are not equal #79

Open
opened 2020年07月18日 18:26:35 +02:00 by sidraaaaa · 3 comments
sidraaaaa commented 2020年07月18日 18:26:35 +02:00 (Migrated from github.com)
Copy link

import barcode
from barcode.writer import ImageWriter
code=input("Enter Code")
EAN = barcode.get_barcode_class('ean8')
ean = EAN(code, writer=ImageWriter())
imag = ean.save('barcode')

Sometimes these unequal lines appears in my image. Why is that so? They are not that visible though, but it seems quite odd when they appear multiple times. The same thing happens when I try to print code 128 and code 39.

My output:

Expected Output:

import barcode from barcode.writer import ImageWriter code=input("Enter Code") EAN = barcode.get_barcode_class('ean8') ean = EAN(code, writer=ImageWriter()) imag = ean.save('barcode') Sometimes these unequal lines appears in my image. Why is that so? They are not that visible though, but it seems quite odd when they appear multiple times. The same thing happens when I try to print code 128 and code 39. My output: ![](https://i.stack.imgur.com/vFOnm.png) Expected Output: ![](https://i.stack.imgur.com/e2zUt.png)
Nilad commented 2021年05月10日 17:12:02 +02:00 (Migrated from github.com)
Copy link

Get Same issue.

Code : 00000

itf = ITF(u'00000', writer=ImageWriter())
itf
<ITF('000000')>
itf.build()
['11001100110011001111100000111110000011001100110011111000001111100000110011001100111110000011111000001100111110011']
fullname = itf.save('itf_barcode')

Image:
itf_barcode

We can see in the 3 last bar, that the tiny bar have not the good width.

But if i use the SVGWriter instead of the ImageWriter, the bar have the correct width.

Get Same issue. Code : 00000 ``` itf = ITF(u'00000', writer=ImageWriter()) itf <ITF('000000')> itf.build() ['11001100110011001111100000111110000011001100110011111000001111100000110011001100111110000011111000001100111110011'] fullname = itf.save('itf_barcode') ``` Image: ![itf_barcode](https://user-images.githubusercontent.com/12897327/117681566-834ba580-b1b2-11eb-80f8-52688fb2a5b1.png) We can see in the 3 last bar, that the tiny bar have not the good width. But if i use the `SVGWriter` instead of the `ImageWriter`, the bar have the correct width.
WhyNotHugo commented 2021年05月10日 17:27:30 +02:00 (Migrated from github.com)
Copy link

You probably want guardbars: EAN(code, writer=ImageWriter(), guardbars=True)

You probably want `guardbars`: `EAN(code, writer=ImageWriter(), guardbars=True)`
Nilad commented 2021年05月10日 17:39:21 +02:00 (Migrated from github.com)
Copy link

@WhyNotHugo Probably yes, but the guardbars option is not available in itf.py

@WhyNotHugo Probably yes, but the `guardbars` option is not available in `itf.py`
Sign in to join this conversation.
No Branch/Tag specified
main
pre-commit-ci-update-config
extensibility
fix_sizes
feature/longer_guard_bar
ean-without-checksum
readme-formatting
cleaning
cleanup
srolin/master
michieldwitte/left-alignment-fix
v0.13.1
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.3
v0.8.2
v0.8.1
v0.8.0
0.8beta1
0.7
0.7beta4
0.7beta3
0.7beta2
v0.6
v0.6b3
v0.6b2
v0.6b1
v0.5.0
v0.5.0b1
v0.4.3
v0.4.2
v0.4.1
v0.4
v0.4b2
v0.4b1
v0.3
v0.3b1
v0.2.1
v0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WhyNotHugo/python-barcode#79
Reference in a new issue
WhyNotHugo/python-barcode
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?