{"id":13714161,"url":"https://github.com/xyproto/xpm","last_synced_at":"2025-09-17T19:34:55.057Z","repository":{"id":65470807,"uuid":"193481526","full_name":"xyproto/xpm","owner":"xyproto","description":"Encode images in the X PixMap (XPM3) image format","archived":false,"fork":false,"pushed_at":"2023-01-24T10:24:39.000Z","size":2779,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T06:49:51.624Z","etag":null,"topics":["encode","format","go","image","xpm","xpm3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"xyproto"}},"created_at":"2019-06-24T10:09:11.000Z","updated_at":"2024-11-18T07:51:06.000Z","dependencies_parsed_at":"2023-02-13T20:16:55.760Z","dependency_job_id":null,"html_url":"https://github.com/xyproto/xpm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xyproto/xpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fxpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fxpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fxpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fxpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/xpm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fxpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275650003,"owners_count":25503216,"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-17T02:00:09.119Z","response_time":84,"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":["encode","format","go","image","xpm","xpm3"],"created_at":"2024-08-02T23:01:53.720Z","updated_at":"2025-09-17T19:34:55.038Z","avatar_url":"https://github.com/xyproto.png","language":"Go","funding_links":["https://ko-fi.com/xyproto"],"categories":["Repositories"],"sub_categories":[],"readme":"# xpm\n\n![Build Status](https://github.com/xyproto/xpm/workflows/Build/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/xpm)](https://goreportcard.com/report/github.com/xyproto/xpm) [![GoDoc](https://godoc.org/github.com/xyproto/xpm?status.svg)](https://godoc.org/github.com/xyproto/xpm) [![License](https://img.shields.io/badge/license-BSD-blue.svg?style=flat)](https://raw.githubusercontent.com/xyproto/xpm/main/LICENSE)\n\nEncode images to the X PixMap (XPM3) image format.\n\nThe resulting images are smaller than the ones from GIMP, since the question mark character is also used, while at the same time avoiding double question marks, which could result in a trigraph (like `??=`, which has special meaning in C).\n\nNote that the number of colors may be reduced as part of the conversion.\n\nThe `png2xpm` utility is included.\n\n## Example use\n\nConverting from a PNG to an XPM file:\n\n```go\n// Open the PNG file\nf, err := os.Open(inputFilename)\nif err != nil {\n    fmt.Fprintf(os.Stderr, \"error: %s\\n\", err)\n    os.Exit(1)\n}\nm, err := png.Decode(f)\nif err != nil {\n    fmt.Fprintf(os.Stderr, \"error: %s\\n\", err)\n    os.Exit(1)\n}\nf.Close()\n\n// Create a new XPM encoder\nenc := xpm.NewEncoder(imageName)\n\n// Prepare to output the XPM data to either stdout or to file\nif outputFilename == \"-\" {\n    f = os.Stdout\n} else {\n    f, err = os.Create(outputFilename)\n    if err != nil {\n        fmt.Fprintf(os.Stderr, \"error: %s\\n\", err)\n        os.Exit(1)\n    }\n    defer f.Close()\n}\n\n// Generate and output the XPM data\nerr = enc.Encode(f, m)\nif err != nil {\n    fmt.Fprintf(os.Stderr, \"error: %s\\n\", err)\n    os.Exit(1)\n}\n```\n\n## Reference documentation\n\n* [The XPM reference](https://www.xfree86.org/current/xpm.pdf)\n\n## General info\n\n* Version: 1.3.0\n* License: BSD-3\n* Author: Alexander F. Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fxpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fxpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fxpm/lists"}