Task 06 of 16 — these are sequential, do them in order.
Previous: #8 · Next: #10
Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.
Goal
Port the Mercosul licence-plate image renderer — the OCR emulator (task 08) sends it as the detection snapshot.
Scope
- Render a Brazilian Mercosul plate (
ABC1D23) as a JPEG, 720 px wide, matching the Go layout: blue header band, white body, black bold monospace glyphs.
- Embed the font in the binary (
include_bytes! a mono bold TTF); no runtime font lookup.
- Public API:
plate::render(text: &str) -> Result<Vec<u8>> (JPEG bytes).
- Crates:
image + ab_glyph/rusttype.
Reference
cloudpark-toolkit/internal/plate/render.go (89 lines)
Done when
Task 06 of 16 — these are sequential, do them in order.
Previous: #8 · Next: #10
Goal
Port the Mercosul licence-plate image renderer — the OCR emulator (task 08) sends it as the detection snapshot.
Scope
ABC1D23) as a JPEG, 720 px wide, matching the Go layout: blue header band, white body, black bold monospace glyphs.include_bytes!a mono bold TTF); no runtime font lookup.plate::render(text: &str) -> Result<Vec<u8>>(JPEG bytes).image+ab_glyph/rusttype.Reference
cloudpark-toolkit/internal/plate/render.go(89 lines)Done when
render("ABC1D23")returns bytes that decode as a valid 720 px JPEG.