{"id":22413475,"url":"https://github.com/lostsh/pixedit","last_synced_at":"2025-09-09T06:50:09.648Z","repository":{"id":265960488,"uuid":"770901633","full_name":"lostsh/pixedit","owner":"lostsh","description":"Simple picture editor : remove background","archived":false,"fork":false,"pushed_at":"2024-03-13T20:22:11.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T09:02:46.487Z","etag":null,"topics":["background-removal","background-remover","cli","command-line-tool","picture-editing","picture-editor","pillow","png","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lostsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-12T11:09:45.000Z","updated_at":"2024-03-18T13:19:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7c2d4db-743f-4f79-bc73-8ead2ee275b3","html_url":"https://github.com/lostsh/pixedit","commit_stats":null,"previous_names":["lostsh/pixedit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lostsh/pixedit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fpixedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fpixedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fpixedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fpixedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostsh","download_url":"https://codeload.github.com/lostsh/pixedit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fpixedit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274257280,"owners_count":25251160,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["background-removal","background-remover","cli","command-line-tool","picture-editing","picture-editor","pillow","png","python3"],"created_at":"2024-12-05T14:12:57.308Z","updated_at":"2025-09-09T06:50:09.598Z","avatar_url":"https://github.com/lostsh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pixedit\r\n\u003e Remove some pixel to make transparent background using PIL\r\n\r\nRequirements: \r\n- `Pillow` version 1.1.7\r\n\r\n## Usage\r\nInstalling environment :\r\n```bash\r\npython3 -m venv .env # Creating virtual environement\r\nsource .env/bin/activate # Activating the environment\r\npython -m pip install pillow # Installing the library\r\n```\r\n\r\nRunning program :\r\n```bash\r\n# To remove all pixels matching the given rgb values :\r\npython main.py -f input.jpg -o output.png -rv 255 -gv 255 -bv 255\r\n\r\n# To keep all pixels matching the given rgb values :\r\npython main.py -f input.jpg -o output.png -rv 255 -gv 255 -bv 255 --keep-pixel\r\n```\r\n\r\n## Examples : \r\n\r\n\r\n|              | Removing pixels | Keeping only selected pixels |\r\n|--------------|:---------------:|:----------------------------:|\r\n| Description  |Removing white background *(all pixels with value 255, 255, 255)*|Keeping only white pixels|\r\n| Command line |`python main.py -f undraw.png -o out.png -rv 255 -gv 255 -bv 255`|`python main.py -f undraw.png -o white.png -rv 255 -gv 255 -bv 255 --keep-pixel`|\r\n| Input image  |\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/35a33dc1-858a-46ed-8c7d-09402d720935\" alt=\"Undraw icon to demonstrate usage\"\u003e|\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/35a33dc1-858a-46ed-8c7d-09402d720935\" alt=\"Undraw icon to demonstrate usage\"\u003e|\r\n| Ouput image  |\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/87db81d8-5e49-458b-b792-2b54fff78367\" alt=\"Undraw icon to demonstrate usage\"\u003e|\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/d6ec741a-1985-4b11-8f94-572bc9828520\" alt=\"Undraw icon to demonstrate usage\"\u003e|\r\n\r\n\u003c!--\r\n\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/3c3d4726-3ec3-4626-9786-573017d0c1f6\" alt=\"Undraw icon to demonstrate usage\"\u003e|\r\n--\u003e\r\n\r\n```bash\r\nusage: Pixedit [-h] -f FILE -o OUT [--keep-pixel] [-rv R_VALUE] [-gv G_VALUE] [-bv B_VALUE] [-d]\r\n\r\nPixel Editor\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -f FILE, --file FILE  Input image path\r\n  -o OUT, --out OUT     Output image path\r\n  --keep-pixel          Keep only pixel matching given rgb. By default, it remove all matching rgb pixels\r\n  -rv R_VALUE, --red-value R_VALUE\r\n                        (r,g,b) Red value to remove 0 - 255\r\n  -gv G_VALUE, --green-value G_VALUE\r\n                        (r,g,b) Blue value to remove 0 - 255\r\n  -bv B_VALUE, --blue-value B_VALUE\r\n                        (r,g,b) Green value to remove 0 - 255\r\n  -d, --debug           Enable debug ouput, disabled by default\r\n```\r\n\r\n|              | Removing pixels | Keeping only selected pixels |\r\n|--------------|:---------------:|:----------------------------:|\r\n| Description  |Removing only dark cat pixels|Keeping only dark cat pixels|\r\n| Command line |`python main.py --file undraw_cat.png --out out.png -rv 63 -gv 61 -bv 86`|` python main.py --file undraw_cat.png --out out.png -rv 63 -gv 61 -bv 86 --keep-pixel`|\r\n| Input image  |\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/63be04dc-72aa-4a06-bcec-760bd04cfa29\" alt=\"Undraw icon to demonstrate usage\"\u003e|\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/63be04dc-72aa-4a06-bcec-760bd04cfa29\" alt=\"Undraw icon to demonstrate usage\"\u003e|\r\n| Ouput image  |\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/81a56086-1adc-44cd-98a9-53d0de27f014\" alt=\"Undraw icon to demonstrate usage\"\u003e|\u003cimg width=\"200px\" src=\"https://github.com/lostsh/pixedit/assets/43549864/df7bf7e6-4cd5-431c-9482-77ae8c63c5b0\" alt=\"Undraw icon to demonstrate usage\"\u003e|\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostsh%2Fpixedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostsh%2Fpixedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostsh%2Fpixedit/lists"}