reduce Code128 xdim

This commit is contained in:
Piotr Oleszczyk 2025-10-02 16:34:36 +02:00
parent 0e8c6ece0e
commit 377b7f1d2f

2
app.py
View file

@ -41,7 +41,7 @@ def mm_for_px(px, dpi=DPI):
@lru_cache(maxsize=256) @lru_cache(maxsize=256)
def make_code128_exact( def make_code128_exact(
grocycode: str, grocycode: str,
xdim_px: int = 3, # narrower bars reduce overall width; ~0.25mm at 300dpi xdim_px: int = 2, # narrower bars reduce overall width; ~0.25mm at 300dpi
dpi: int = DPI, dpi: int = DPI,
) -> Image.Image: ) -> Image.Image:
code = Code128(grocycode, writer=ImageWriter()) code = Code128(grocycode, writer=ImageWriter())