{"id":22088057,"url":"https://github.com/bw9ubwo/artdirector","last_synced_at":"2025-03-23T22:41:09.881Z","repository":{"id":57411698,"uuid":"455663481","full_name":"bw9ubwo/artdirector","owner":"bw9ubwo","description":"Crop your image to different resolutions without missing the subject. Python module and cli tool.","archived":false,"fork":false,"pushed_at":"2023-10-20T09:25:26.000Z","size":880,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T14:11:21.245Z","etag":null,"topics":["cropimage","image-processing","python","responsive-design","responsive-images"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bw9ubwo.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}},"created_at":"2022-02-04T18:59:20.000Z","updated_at":"2022-08-16T16:42:41.000Z","dependencies_parsed_at":"2024-10-28T17:54:45.873Z","dependency_job_id":"c27ee847-3988-45cd-9de8-63882cc40d43","html_url":"https://github.com/bw9ubwo/artdirector","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"6f3245a7ae85789f09b9cf48e14121fd4852496e"},"previous_names":["bw9ubwo/artdirector","jdnumm/artdirector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bw9ubwo%2Fartdirector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bw9ubwo%2Fartdirector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bw9ubwo%2Fartdirector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bw9ubwo%2Fartdirector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bw9ubwo","download_url":"https://codeload.github.com/bw9ubwo/artdirector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245181531,"owners_count":20573717,"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":["cropimage","image-processing","python","responsive-design","responsive-images"],"created_at":"2024-12-01T02:07:27.234Z","updated_at":"2025-03-23T22:41:09.841Z","avatar_url":"https://github.com/bw9ubwo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# artdirector\n\nSet a focal point and \"artdirector\" crop your image to different resolutions without missing the subject. Ideal to create images for mixed or responsive media.\n\n## Example\n\nOriginal Image (by me)\n\n![Original size](https://raw.githubusercontent.com/jdnumm/artdirector/main/example/example.jpeg)\n\nVariants\n\n```\nartdirector --focus-x 260 --focus-y 440 --height 600 --width 600 --zoom 0.0 --edge 3.0 example.jpeg test-1.jpeg\nartdirector --focus-x 260 --focus-y 440 --height 600 --width 300 --zoom 0.2 --edge 3.0 example.jpeg test-2.jpeg\nartdirector --focus-x 260 --focus-y 440 --height 600 --width 600 --zoom 0.7 --edge 3.0 example.jpeg test-3.jpeg\n```\n\n![Crop 1](https://raw.githubusercontent.com/jdnumm/artdirector/main/example/test-1.jpeg)\n![Crop 2](https://raw.githubusercontent.com/jdnumm/artdirector/main/example/test-2.jpeg)\n![Crop 3](https://raw.githubusercontent.com/jdnumm/artdirector/main/example/test-3.jpeg)\n\n## Installation\n\n    pip3 install artdirector\n\n## Usage\n\nUse it as a command-line tool:\n\n```\n$ artdirector --help\nusage: artdirector [-h] [--width WIDTH] [--height HEIGHT] [--focus-x FOCUS_X] [--focus-y FOCUS_Y] [--zoom ZOOM]\n                      INPUT_FILE OUTPUT_FILE\n\npositional arguments:\n  INPUT_FILE         Input image\n  OUTPUT_FILE        Output image\n\noptions:\n  -h, --help         show this help message and exit\n  --width WIDTH      Crop width\n  --height HEIGHT    Crop height\n  --focus-x FOCUS_X  Focal point\n  --focus-y FOCUS_Y  Focal point\n  --zoom ZOOM        Zoom between 0.0 - 1.0 (0.0. Default)\n  --edge EDGE        Edge (size/n) around the focal target area\n\n```\n\nAs a Python module\n\n\n```\nfrom artdirector import ArtDirector\n\nad = ArtDirector()\nad.load('input.jpg')\nad.crop([400, 400], focus=[600, 300], zoom=0.3)\nad.save('output.jpg')\nad.filter_blur().filter_bw()\nad.save('output-blur-bw.jpg')\n\nprint(ad.image) # PIL Image\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbw9ubwo%2Fartdirector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbw9ubwo%2Fartdirector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbw9ubwo%2Fartdirector/lists"}