{"id":21296448,"url":"https://github.com/mawngo/kcomp","last_synced_at":"2026-03-10T11:04:38.869Z","repository":{"id":238301634,"uuid":"796282097","full_name":"mawngo/kcomp","owner":"mawngo","description":"Image color quantization using k-means","archived":false,"fork":false,"pushed_at":"2025-12-11T17:49:14.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-14T18:37:12.710Z","etag":null,"topics":["color-quantization","command-line-tool","image-processing","k-means"],"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/mawngo.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-05T13:44:45.000Z","updated_at":"2025-12-11T17:49:00.000Z","dependencies_parsed_at":"2024-06-03T04:27:13.592Z","dependency_job_id":"01a7c6f9-058e-4b92-8ed0-c2c4805a6f41","html_url":"https://github.com/mawngo/kcomp","commit_stats":null,"previous_names":["lana-toolbox/kcompressor","lana-toolbox/kcomp","sitdownrightnow2552/kcomp","mawngo/kcomp","sitdownrightnow/kcomp"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/mawngo/kcomp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawngo%2Fkcomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawngo%2Fkcomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawngo%2Fkcomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawngo%2Fkcomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mawngo","download_url":"https://codeload.github.com/mawngo/kcomp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawngo%2Fkcomp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30331646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"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":["color-quantization","command-line-tool","image-processing","k-means"],"created_at":"2024-11-21T14:26:39.460Z","updated_at":"2026-03-10T11:04:38.830Z","avatar_url":"https://github.com/mawngo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K-Compressor\n\nReduce the number of colors used in an image using k-mean clustering.\n\n## Installation\n\nRequire go 1.25+\n\n```shell\ngo install github.com/mawngo/kcomp@latest\n```\n\n## Usage\n\ncompress image\n\n```shell\n\u003e kcomp .\\my-image.jpeg\n```\n\nor compress directory of images\n\n```shell\n\u003e kcomp .\\my-dir\n```\n\n### Options\n\n```\n\u003e kcomp -h  \nReduce number of colors used in image\n\nUsage:\n  kcomp [files...] [flags]\n  \nFlags:\n  -n, --colors int        Number of colors to use (default 15)\n  -o, --out string        Output directory name (default \".\")\n  -s, --series int        Number of image to generate, series of output with increasing number of colors up util reached --colors parameter\n  -q, --quick             Increase speed in exchange of accuracy\n  -w, --overwrite         Overwrite output if exists\n  -i, --round int         Maximum number of round before stop adjusting (number of kmeans iterations) (default 100)\n  -d, --delta float       Delta threshold of convergence (delta between kmeans old and new centroid’s values) (default 0.005)\n  -t, --concurrency int   Maximum number image process at a time [0=auto] (default 3)\n      --kcpu int          Maximum cpu used processing each image [0=auto] (default 8)\n      --dalgo string      Distance algo for kmeans [EuclideanDistance,EuclideanDistanceSquared] (default \"EuclideanDistance\")\n      --jpeg int          Specify quality of output jpeg compression [0-100] (default 0 - output png)\n      --palette           Generate an additional palette image\n      --debug             Enable debug mode\n  -h, --help              help for kcomp\n```\n\n## Examples\n\n```shell\n\u003e kcomp .\\chika.jpeg --colors=5\n```\n\n```shell\n4:05PM INF Processing cp=5 round=100 img=chika.jpeg dimension=200x200 format=jpeg\n4:05PM INF Compress completed out=chika.kcp100n5.png took=33.1119ms iter=3\n4:05PM INF Processing completed took=34.7113ms\n```\n\n| Original                  | 5 Colors                                  | 4 Colors                                  |\n|---------------------------|-------------------------------------------|-------------------------------------------|\n| ![chika.jpeg](chika.jpeg) | ![chika.kcp100n5.png](chika.kcp100n5.png) | ![chika.kcp100n4.png](chika.kcp100n4.png) |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmawngo%2Fkcomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmawngo%2Fkcomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmawngo%2Fkcomp/lists"}