{"id":22281851,"url":"https://github.com/simonwaldherr/zplgfa","last_synced_at":"2025-10-31T21:30:34.766Z","repository":{"id":49797780,"uuid":"153820885","full_name":"SimonWaldherr/zplgfa","owner":"SimonWaldherr","description":"#Golang package and cli tool for converting to #ZPL (from PNG, JPEG and GIF) for @ZebraTechnology-printers","archived":false,"fork":false,"pushed_at":"2024-08-17T10:25:27.000Z","size":160,"stargazers_count":68,"open_issues_count":0,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T20:42:38.643Z","etag":null,"topics":["gfa","golang","grf","hacktoberfest-accepted","image","label","labeling-tool","zebra","zebra-label-printers","zebra-printer","zpl","zpl-programming-language","zpl2"],"latest_commit_sha":null,"homepage":"","language":"Go","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/SimonWaldherr.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}},"created_at":"2018-10-19T17:48:16.000Z","updated_at":"2025-01-27T20:19:41.000Z","dependencies_parsed_at":"2024-06-16T14:31:51.750Z","dependency_job_id":"900986bd-40f5-41e3-943d-e91f3c568c2e","html_url":"https://github.com/SimonWaldherr/zplgfa","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2Fzplgfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2Fzplgfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2Fzplgfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonWaldherr%2Fzplgfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimonWaldherr","download_url":"https://codeload.github.com/SimonWaldherr/zplgfa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239231089,"owners_count":19603991,"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","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":["gfa","golang","grf","hacktoberfest-accepted","image","label","labeling-tool","zebra","zebra-label-printers","zebra-printer","zpl","zpl-programming-language","zpl2"],"created_at":"2024-12-03T16:22:46.918Z","updated_at":"2025-10-31T21:30:34.725Z","avatar_url":"https://github.com/SimonWaldherr.png","language":"Go","readme":"*since I am currently working exclusively in the home office and no longer have to do with labels professionally (only as a hobby), I can unfortunately no longer work on this project.*\n*But if someone would like to provide me a [@Zebra](https://github.com/Zebra) printer, I would be happy to develop it further.*\n*Of course, pull requests are still welcome.*\n\n# ZPLGFA Golang Package\n\n*convert pictures to ZPL compatible ^GF-elements*\n\n[![GoDoc](https://godoc.org/github.com/SimonWaldherr/zplgfa?status.svg)](https://godoc.org/github.com/SimonWaldherr/zplgfa) \n[![Coverage Status](https://coveralls.io/repos/github/SimonWaldherr/zplgfa/badge.svg?branch=master)](https://coveralls.io/github/SimonWaldherr/zplgfa?branch=master) \n[![Go Report Card](https://goreportcard.com/badge/github.com/SimonWaldherr/zplgfa)](https://goreportcard.com/report/github.com/SimonWaldherr/zplgfa) \n[![codebeat badge](https://codebeat.co/badges/28d795af-6f9b-453a-94c2-4fafb8b5b0d5)](https://codebeat.co/projects/github-com-simonwaldherr-zplgfa-master) \n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSimonWaldherr%2Fzplgfa.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSimonWaldherr%2Fzplgfa?ref=badge_shield) \n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/SimonWaldherr/zplgfa/master/LICENSE) \n\nThe ZPLGFA **Golang** package implements some functions to convert PNG, JPEG and GIF encoded graphic files to ZPL compatible ^GF-elements ([Graphic Fields](https://www.zebra.com/us/en/support-downloads/knowledge-articles/gf-graphic-field-zpl-command.html)).\n\nIf you need a ready to use application and don't want to hassle around with source code, take a look at the [ZPLGFA CLI Tool](https://github.com/SimonWaldherr/zplgfa/tree/master/cmd/zplgfa) which is based on this package.\n\n## install\n\n1. [install Golang](https://golang.org/doc/install)\n1. `go get simonwaldherr.de/go/zplgfa`\n\n## example\n\ntake a look at the [example application](https://github.com/SimonWaldherr/zplgfa/tree/master/cmd/zplgfa)  \nor at this sample code:  \n\n```go\npackage main\n\nimport (\n    \"simonwaldherr.de/go/zplgfa\"\n    \"fmt\"\n    \"image\"\n    _ \"image/gif\"\n    _ \"image/jpeg\"\n    _ \"image/png\"\n    \"log\"\n    \"os\"\n)\n\nfunc main() {\n    // open file\n    file, err := os.Open(\"label.png\")\n    if err != nil {\n        log.Printf(\"Warning: could not open the file: %s\\n\", err)\n        return\n    }\n\n    defer file.Close()\n\n    // load image head information\n    config, format, err := image.DecodeConfig(file)\n    if err != nil {\n        log.Printf(\"Warning: image not compatible, format: %s, config: %v, error: %s\\n\", format, config, err)\n    }\n\n    // reset file pointer to the beginning of the file\n    file.Seek(0, 0)\n\n    // load and decode image\n    img, _, err := image.Decode(file)\n    if err != nil {\n        log.Printf(\"Warning: could not decode the file, %s\\n\", err)\n        return\n    }\n\n    // flatten image\n    flat := zplgfa.FlattenImage(img)\n\n    // convert image to zpl compatible type\n    gfimg := zplgfa.ConvertToZPL(flat, zplgfa.CompressedASCII)\n\n    // output zpl with graphic field data to stdout\n    fmt.Println(gfimg)\n}\n\n```\n\n## label server\n\nIf you have dozens of label printers in use and need to fill and print label templates, this tool will help you:  \n\n[![SimonWaldherr/ups - GitHub](https://gh-card.dev/repos/SimonWaldherr/ups.svg?fullname)](https://github.com/SimonWaldherr/ups)\n\n\n## License\n\n[MIT](https://github.com/SimonWaldherr/zplgfa/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwaldherr%2Fzplgfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonwaldherr%2Fzplgfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwaldherr%2Fzplgfa/lists"}