{"id":15469264,"url":"https://github.com/maxhalford/carre","last_synced_at":"2025-04-30T18:44:56.950Z","repository":{"id":57644466,"uuid":"89886360","full_name":"MaxHalford/carre","owner":"MaxHalford","description":":ok_hand: Image simplifier","archived":false,"fork":false,"pushed_at":"2017-05-11T13:50:18.000Z","size":1507,"stargazers_count":33,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T10:23:09.363Z","etag":null,"topics":["golang","image-processing"],"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/MaxHalford.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":"2017-05-01T00:40:39.000Z","updated_at":"2021-10-13T22:59:31.000Z","dependencies_parsed_at":"2022-08-30T05:30:44.779Z","dependency_job_id":null,"html_url":"https://github.com/MaxHalford/carre","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/MaxHalford%2Fcarre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxHalford%2Fcarre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxHalford%2Fcarre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxHalford%2Fcarre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxHalford","download_url":"https://codeload.github.com/MaxHalford/carre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242685799,"owners_count":20169240,"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":["golang","image-processing"],"created_at":"2024-10-02T01:58:21.273Z","updated_at":"2025-03-09T11:31:21.051Z","avatar_url":"https://github.com/MaxHalford.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# carre\n\nThis is the implementation of a very algorithm for \"simplifying\" images. The idea is that patches of a single can carry the same visual information with less detail; this results in images that are easier to compress and look a bit like cubism. The algorithm goes as follows:\n\n1. Calculate the average color of the initial image\n2. Calculate the average color difference from the average calculated in step 1\n3. If the average color difference higher than some threshold, split the image in 4 and apply step 1 to each sub-image\n4. If not then color a new blank image with the average color obtained in step 1 and the boundaries of the current image\n\nThe algorithm is recursive and deterministic. Lowering the threshold will result in images with more detail, indeed if the threshold is 0 then the algorithm reproduces the original image.\n\n## Installation\n\n1. [Install Go](https://golang.org/doc/install)\n2. Make sure that `$GOPATH` is set and that `$GOPATH/bin` has been added to the global path\n3. Run `go get -u github.com/MaxHalford/carre`\n4. Run `carre -help` to check that the installation was successful\n\n## Examples\n\n```sh\ncarre -in original/rousseau-1.jpg -out processed/rousseau-1.png -threshold 15\n```\n\nOriginal            |  Processed\n:-------------------------:|:-------------------------:\n![rousseau-1-original](original/rousseau-1.jpg)  |  ![rousseau-1-processed](processed/rousseau-1.png)\n\n```sh\ncarre -in original/rousseau-2.jpg -out processed/rousseau-2.png -threshold 10\n```\n\nOriginal            |  Processed\n:-------------------------:|:-------------------------:\n![rousseau-2-original](original/rousseau-2.jpg)  |  ![rousseau-2-processed](processed/rousseau-2.png)\n\n```sh\ncarre -in original/rousseau-2.jpg -out processed/rousseau-3.png -threshold 30\n```\n\nOriginal            |  Processed\n:-------------------------:|:-------------------------:\n![rousseau-3-original](original/rousseau-3.jpg)  |  ![rousseau-3-processed](processed/rousseau-3.png)\n\n## Usage\n\nRun `carre -h` to get a list of available parameters.\n\n## License\n\nThe MIT License (MIT). Please see the [license file](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhalford%2Fcarre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxhalford%2Fcarre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhalford%2Fcarre/lists"}