{"id":41253306,"url":"https://github.com/xusenlin/imgo","last_synced_at":"2026-01-23T01:44:04.607Z","repository":{"id":116267116,"uuid":"285724261","full_name":"xusenlin/imgo","owner":"xusenlin","description":"图片内容的查找替换工具","archived":false,"fork":false,"pushed_at":"2020-08-18T02:06:33.000Z","size":1208,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T00:45:37.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/xusenlin.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":"2020-08-07T03:05:31.000Z","updated_at":"2021-03-02T03:28:01.000Z","dependencies_parsed_at":"2023-05-26T21:15:10.289Z","dependency_job_id":null,"html_url":"https://github.com/xusenlin/imgo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xusenlin/imgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fimgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fimgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fimgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fimgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xusenlin","download_url":"https://codeload.github.com/xusenlin/imgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fimgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-23T01:44:04.021Z","updated_at":"2026-01-23T01:44:04.601Z","avatar_url":"https://github.com/xusenlin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgo\nGolang 图片工具箱\n\n## 1.图片内容的查找替换\n\n- `func (p *Picture) SetCompareAccuracy(compareAccuracy int)` 设置图片在查找过程找到图片后对比的精确度，1代表100%完全吻合。\n- `func (p *Picture) SearchPic(searchPic *Picture) (bool, image.Rectangle)` 在大图中查找小图出现的一个区域\n- `func (p *Picture) SearchAllPic(searchPic *Picture) (bool, []image.Rectangle)` 在大图中查找小图出现的多个区域\n- `func (p *Picture) Replace(searchPic *Picture, replacer *Picture) (image.Image, error)` 在大图中查找并替换小图的一个区域\n- `func (p *Picture) ReplaceAll(searchPic *Picture, replacer *Picture) (image.Image, error)`在大图中查找并替换小图的多个区域\n\n### demo\n```go\npic, err := imgo.NewPng(\"./cat.png\")\nsearchPic, err := imgo.NewPng(\"./x.png\")\nreplace, err := imgo.NewPng(\"./text.png\")\np, err := pic.ReplaceAll(searchPic, replace)\n```\n\u003e 如果你有几万张设计稿需要替换文字或者一些图案，此工具库可能很好的帮助你编写代码\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusenlin%2Fimgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxusenlin%2Fimgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusenlin%2Fimgo/lists"}