{"id":16493897,"url":"https://github.com/echosoar/imgpro","last_synced_at":"2025-07-27T23:37:14.276Z","repository":{"id":37006770,"uuid":"333426005","full_name":"echosoar/imgpro","owner":"echosoar","description":"Imgpro is a multifunctional image information recognition library, supporting a variety of image formats. And it can be run in the browser through WebAssembly(wasm).","archived":false,"fork":false,"pushed_at":"2022-08-03T16:01:47.000Z","size":14750,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-01T08:32:43.373Z","etag":null,"topics":["bmp-decoder","gif-decoder","go-qrcode","golang","image","image-decoder","image-recognition","jpg-decoder","js-image","no-dependencies","png","png-decoder","pure-golang","qrcode-decoder","webassembly","webp","webp-decoder"],"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/echosoar.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}},"created_at":"2021-01-27T13:17:01.000Z","updated_at":"2024-09-28T16:57:09.000Z","dependencies_parsed_at":"2022-08-08T19:00:26.890Z","dependency_job_id":null,"html_url":"https://github.com/echosoar/imgpro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fimgpro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fimgpro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fimgpro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echosoar%2Fimgpro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echosoar","download_url":"https://codeload.github.com/echosoar/imgpro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238560838,"owners_count":19492600,"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":["bmp-decoder","gif-decoder","go-qrcode","golang","image","image-decoder","image-recognition","jpg-decoder","js-image","no-dependencies","png","png-decoder","pure-golang","qrcode-decoder","webassembly","webp","webp-decoder"],"created_at":"2024-10-11T14:11:03.097Z","updated_at":"2025-02-12T22:31:52.741Z","avatar_url":"https://github.com/echosoar.png","language":"Go","readme":"# Imgpro\n\n[![CircleCI](https://circleci.com/gh/echosoar/imgpro/tree/main.svg?style=svg\u0026circle-token=355449f4d49bf63a561c68c57221688dadc48691)]((https://circleci.com/gh/echosoar/imgpro/tree/main))\n\nImgpro is a multifunctional image information recognition library, supporting a variety of image formats. And it can be run in the browser through WebAssembly(wasm).\n\n\nOnline Demo: [imgpro](https://echosoar.github.io/imgpro/)\n### Usage\n#### Initial\n```shell\n$ go get github.com/echosoar/imgpro\n```\n#### Use in code\n```go\nimport (\n  \"github.com/echosoar/imgpro\"\n)\n\nfunc main() {\n  // run by file path\n  result := imgpro.Run(\"./test/imgs/go.png\", []string{\"size\", \"type\"})\n  // you can also run by file binary data\n  // result := imgpro.RunBinary(binary, attributes)\n  \n  if result[\"size\"].Int != 60746 {\n    panic(\"size error\")\n  }\n  \n  if result[\"type\"].String != \"png\" {\n    panic(\"type error\")\n  }\n}\n```\n\n### Method\n#### Run\n\n\u003e Get image information by local file path\n\n|Param Index|Param Name|Type|Examples|\n| --- | --- | --- |--- |\n| 0 | filePath | string | \"./test/imgs/go.png\" |\n| 1 | attributes | []string | []string{\"size\", \"type\", \"rgba\", \"hue\", \"qrcode\"} |\n\n```go\nimport (\n  \"github.com/echosoar/imgpro\"\n)\n\nfunc main() {\n  result := imgpro.Run(\"./test/imgs/go.png\", []string{\"size\", \"type\", \"rgba\", \"hue\", \"qrcode\"})\n}\n```\n\n#### RunBinary\n\u003e Get image information by file binary data\n\n|Param Index|Param Name|Type|Examples|\n| --- | --- | --- |--- |\n| 0 | fileBinary | []byte | reader.Read(binary) |\n| 1 | attributes | []string | []string{\"size\", \"type\", \"rgba\", \"hue\", \"qrcode\"} |\n\n```go\nimport (\n  \"bufio\"\n  \"os\"\n\n  \"github.com/echosoar/imgpro\"\n)\n\nfunc main() {\n  fileHandler, err := os.Open(filePath)\n\tif err != nil {\n\t\tpanic(\"open error\")\n\t}\n\tdefer fileHandler.Close()\n\tfileBytes := make([]byte, size)\n\treader := bufio.NewReader(fileHandler)\n\t_, readErr := reader.Read(fileBytes)\n\tif readErr != nil {\n\t\tpanic(\"file read error\")\n\t}\n  result := imgpro.RunBinary(fileBytes, []string{\"size\", \"type\", \"rgba\", \"hue\", \"qrcode\"})\n}\n```\n\n### Features\n\n| Features | Attribute | PNG | JPG | GIF | BMP | WebP | HEIC | AVIF |\n| --- | --- | :---: | :---: | :---: | :---: | :---: |  :---: | :---: |\n| File Size | size | ✅ | ✅ | ✅ | ✅ | ✅ |||\n| Format Detect | type | ✅ | ✅ | ✅ | ✅ | ✅ |||\n| Width/Height| wh | ✅ | ✅ | ✅ | ✅ | ✅ ||\n| Frames | frame | ✅ | ✅ | ✅  |\n| Color data | rgba | ✅ | ✅ | ✅ |\n| Color proportion | hue | ✅ | ✅ | ✅ |\n| QR Code | qrcode | ✅ | ✅| ✅ | | |\n| Exif | exif |  | ✅ |\n| Create Time | time | |✅ | | | |\n| Position(GPS) Info | position | |✅  | | | |\n| Device Info | device | | ✅| | | |\n\n---\n\n© MIT by echosoar\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosoar%2Fimgpro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechosoar%2Fimgpro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechosoar%2Fimgpro/lists"}