Spaces:
Sleeping
Sleeping
|
Download README.md from van-william/zpl-generator: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/spaces/van-william/zpl-generator/resolve/main/README.md
- Command line
-
hf download hf://spaces/van-william/zpl-generator/README.md
-
curl -L -o README.md https://huggingface.co/spaces/van-william/zpl-generator/resolve/main/README.md
1.42 kB
A newer version of the Gradio SDK is available: 6.33.0
metadata
title: Zpl Generator
emoji: 🔥
colorFrom: blue
colorTo: blue
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: mit
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Image → ZPL (^GFA) Converter — Hugging Face Space
This is a simple Gradio app that converts an uploaded image into Zebra Programming Language ZPL using the ^GFA (ASCII Hex) graphics command.
Features
- Scale image to label width by (inches × DPI)
- Dithering or manual threshold to 1‑bit
- Optional invert
- Preview the converted bitmap
- Generate complete ZPL with
^XA/^XZ,^PW,^LL,^FO, and^GFA - Download a ready‑to‑print
.zplfile
Run locally
pip install -r requirements.txt
python app.py
# open the printed local URL
Deploy to Hugging Face Spaces
- Create a new Space (SDK: Gradio, Python).
- Upload these files:
app.pyrequirements.txtREADME.md(optional)
- The app should build and run automatically.
Notes
^GFA,m,n,o,data(ASCII Hex): wheremis total bytes of data,nis bytes per row,ois rows (height).- The app pads the bitmap width to a multiple of 8 pixels (ZPL packs 8 dots per byte).
- For a 4×6" label at 203 dpi, the max width is ≈ 812 dots.
If you need Z64 compression or ~DG/^XG storage, open an issue/PR and we can extend it.