{"id":16874561,"url":"https://github.com/joway/libimagequant-go","last_synced_at":"2025-04-11T11:25:25.905Z","repository":{"id":57511360,"uuid":"164895127","full_name":"joway/libimagequant-go","owner":"joway","description":"golang wrapper for libimagequant.","archived":false,"fork":false,"pushed_at":"2019-04-09T11:00:01.000Z","size":763,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T07:51:09.357Z","etag":null,"topics":["compression","golang","libimagequant","png"],"latest_commit_sha":null,"homepage":"","language":"C","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/joway.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":"2019-01-09T16:09:12.000Z","updated_at":"2024-04-19T06:46:31.000Z","dependencies_parsed_at":"2022-08-29T05:20:18.229Z","dependency_job_id":null,"html_url":"https://github.com/joway/libimagequant-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flibimagequant-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flibimagequant-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flibimagequant-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flibimagequant-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joway","download_url":"https://codeload.github.com/joway/libimagequant-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382846,"owners_count":21094563,"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":["compression","golang","libimagequant","png"],"created_at":"2024-10-13T15:33:16.057Z","updated_at":"2025-04-11T11:25:25.879Z","avatar_url":"https://github.com/joway.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libimagequant-go\n\n![GitHub release](https://img.shields.io/github/tag/joway/libimagequant-go.svg?label=release)\n[![Go Report Card](https://goreportcard.com/badge/github.com/joway/libimagequant-go)](https://goreportcard.com/report/github.com/joway/libimagequant-go)\n[![codecov](https://codecov.io/gh/joway/libimagequant-go/branch/master/graph/badge.svg)](https://codecov.io/gh/joway/libimagequant-go)\n[![CircleCI](https://circleci.com/gh/joway/libimagequant-go.svg?style=shield)](https://circleci.com/gh/joway/libimagequant-go)\n\nA golang wrapper for [libimagequant](https://github.com/ImageOptim/libimagequant).\n\n## Used by\n\n- [imagic](https://github.com/joway/imagic): An easy and fast tool to process images.\n\n## Install\n\n```shell\ngo get github.com/joway/libimagequant-go\n```\n\n## Usage\n\n### High Level API\n\n```\n// compress png iamge\nfunc Compress(img image.Image, quality int, speed int) (image.Image, error)\n```\n\n### Low Level API\n\n[GoDoc](https://godoc.org/github.com/joway/libimagequant-go/pngquant)\n\n## Example\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/joway/libimagequant-go/pngquant\"\n\t\"image/png\"\n\t\"os\"\n)\n\nfunc main() {\n\tsource, _ := os.OpenFile(\"testdata/1.png\", os.O_RDONLY, 0444)\n\timg, _ := png.Decode(source)\n\tquality := 70\n\tspeed := 5 // 1~10\n\toutput, err := pngquant.Compress(img, quality, speed)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Flibimagequant-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoway%2Flibimagequant-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Flibimagequant-go/lists"}