{"id":30783393,"url":"https://github.com/stestagg/escpos-embed-image","last_synced_at":"2025-09-05T10:54:46.852Z","repository":{"id":306517114,"uuid":"1026460035","full_name":"stestagg/escpos-embed-image","owner":"stestagg","description":"Companion crate to escpos-embedded that provides the embed_image!() macro","archived":false,"fork":false,"pushed_at":"2025-08-18T01:21:54.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T03:14:04.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stestagg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-25T23:51:56.000Z","updated_at":"2025-08-18T01:21:57.000Z","dependencies_parsed_at":"2025-07-26T06:40:53.980Z","dependency_job_id":"267ef3aa-560d-46e0-8449-8c0ef7463e48","html_url":"https://github.com/stestagg/escpos-embed-image","commit_stats":null,"previous_names":["stestagg/escpos-embed-image"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stestagg/escpos-embed-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stestagg%2Fescpos-embed-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stestagg%2Fescpos-embed-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stestagg%2Fescpos-embed-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stestagg%2Fescpos-embed-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stestagg","download_url":"https://codeload.github.com/stestagg/escpos-embed-image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stestagg%2Fescpos-embed-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273747798,"owners_count":25160652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-05T10:54:44.115Z","updated_at":"2025-09-05T10:54:46.823Z","avatar_url":"https://github.com/stestagg.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# escpos-embed-image\n\nA procedural macro for embedding monochrome, dithered images into ESC/POS printer drivers at compile time.\n\nDesigned as a companion to `escpos-embedded`, this crate processes Images at compile time and generates a static `Image\u003c\u0026'static [u8]\u003e` compatible with the `no_std`, allocation-free printer interface.\n\n## Features\n\n- Compile-time image loading and conversion\n- Converts image file to 1-bit dithered format (Bi-level Floyd-Steinberg)\n- Outputs `Image\u003c\u0026'static [u8]\u003e` struct ready for printing\n- No runtime dependencies\n\n## Example\n\n```rust\nuse escpos_embedded::Image;\nuse escpos_embed_image::{embed_image, embed_images};\n\nstatic LOGO: Image\u003c\u0026'static [u8]\u003e = embed_image!(\"assets/logo.png\");\n\nembed_images!(\n    #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]\n    enum Assets {\n        #[pattern(\"assets/*.png\")]\n    }\n);\n\n// Generated enum `Assets` with variants for each matched file\n// Assets::Logo.get_image() -\u003e \u0026'static Image\u003c\u0026'static [u8]\u003e\n```\n\n## How it works\n\n- At compile time, the macro loads the image file (any supported format)\n- As required: Converts it to grayscale, then applies dithering\n- Packs the result into 1-bit-per-pixel (row-major) format\n- Emits a static `Image` instance with dimensions and data\n\n## Requirements\n\n- Input must be a valid image file path\n- The output image must be small enough to fit in flash/ROM (no heap)\n\n## Crate Structure\n\nThis is a separate crate from `escpos-embedded` because it uses `proc-macro` and requires `std`. It is intended for use on the host during build/compile time only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstestagg%2Fescpos-embed-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstestagg%2Fescpos-embed-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstestagg%2Fescpos-embed-image/lists"}