{"id":24946664,"url":"https://github.com/edoardotosin/batch-image-converter","last_synced_at":"2025-09-07T14:47:05.420Z","repository":{"id":39490557,"uuid":"502003759","full_name":"EdoardoTosin/Batch-Image-Converter","owner":"EdoardoTosin","description":"Streamline your image editing process with this Python script, capable of converting large batches of images to desired formats and specifications, including DPI, resolution, and color space.","archived":false,"fork":false,"pushed_at":"2024-07-12T10:30:17.000Z","size":1691,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-12T12:00:36.385Z","etag":null,"topics":["conversion","converter","image-processing","jpeg","pillow","png","python","python3"],"latest_commit_sha":null,"homepage":"http://edoardotosin.com/Batch-Image-Converter/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EdoardoTosin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T10:39:25.000Z","updated_at":"2024-07-12T10:30:20.000Z","dependencies_parsed_at":"2023-10-28T11:24:21.493Z","dependency_job_id":"63cdd62f-9db1-4fb0-bec4-5d17132f4d23","html_url":"https://github.com/EdoardoTosin/Batch-Image-Converter","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdoardoTosin%2FBatch-Image-Converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdoardoTosin%2FBatch-Image-Converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdoardoTosin%2FBatch-Image-Converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdoardoTosin%2FBatch-Image-Converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdoardoTosin","download_url":"https://codeload.github.com/EdoardoTosin/Batch-Image-Converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236853825,"owners_count":19215175,"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":["conversion","converter","image-processing","jpeg","pillow","png","python","python3"],"created_at":"2025-02-02T20:58:25.889Z","updated_at":"2025-02-02T20:58:26.572Z","avatar_url":"https://github.com/EdoardoTosin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003csub\u003e\n\t\t\u003cimg src=\"https://raw.githubusercontent.com/EdoardoTosin/Batch-Image-Converter/main/assets/logo.png\" height=\"38\" width=\"38\"\u003e\n\t\u003c/sub\u003e\n\tBatch Image Converter\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/EdoardoTosin/Batch-Image-Converter/releases/latest\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/EdoardoTosin/Batch-Image-Converter/main/assets/get-it-on-github.png\" alt=\"Get it on GitHub\" height=80px\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/EdoardoTosin/Batch-Image-Converter/actions/workflows/build.yml\"\u003e\n        \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/edoardotosin/Batch-Image-Converter/build.yml?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/EdoardoTosin/Batch-Image-Converter/releases/latest\"\u003e\n        \u003cimg alt=\"GitHub release (latest SemVer)\" src=\"https://img.shields.io/github/v/release/EdoardoTosin/Batch-Image-Converter?label=Latest%20Release\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003cimg alt=\"GitHub all releases\" src=\"https://img.shields.io/github/downloads/edoardotosin/Batch-Image-Converter/total?style=for-the-badge\"\u003e\n    \u003ca href=\"https://edoardotosin.github.io/Batch-Image-Converter\"\u003e\n        \u003cimg alt=\"GitHub deployments\" src=\"https://img.shields.io/github/deployments/edoardotosin/Batch-Image-Converter/github-pages?label=DEPLOYMENT\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/EdoardoTosin/Batch-Image-Converter/blob/main/LICENSE\"\u003e\n\t\t\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/edoardotosin/Batch-Image-Converter?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Summary\n\nPython script that enables users to convert images to a specific dpi, maximum long side resolution, and RGB color space. It supports various file types and provides a user-friendly CLI for easy usage. Additionally, it offers precompiled binaries for Linux, Windows, and Mac platforms, allowing users to run the script without installing Python or any dependencies.\n\n![Output](https://raw.githubusercontent.com/EdoardoTosin/Batch-Image-Converter/main/assets/output.jpg)\n\n## Features\n\n- Convert images to a specific dpi and maximum long side resolution (Default: 72dpi, 1000px).\n- Convert images to RGB color space (Important: ICC colour profiles are not used for this conversion so switching between different formats may result in incorrect colours).\n- Downscale images using different filters.\n- Compress the palette by eliminating unused colors.\n- Alert user upon completion of conversion.\n- Wait for user keypress upon completion of conversion.\n\n## Method 1: Download release binary\n\nThere are precompiled binaries for Linux, Windows, and Mac. These binary files allow you to run the script without installing Python or any dependencies. You can download these binaries from the [Releases](https://github.com/EdoardoTosin/Batch-Image-Converter/releases/latest) page. After downloading, simply run the binary file to start using the script.\n\n## Method 2: Build release binary\n\nIf you wish to manually build the binaries, the repository contains scripts to do so for both Windows and Linux platforms. \n\nFor Windows, from the `Batch-Image-Converter` directory run `buildWin.ps1` PowerShell script as followed:\n\n```powershell\ngit clone https://github.com/EdoardoTosin/Batch-Image-Converter.git\ncd Batch-Image-Converter\n.\\tools\\buildWin.ps1\n```\n\nFor Linux, from the `Batch-Image-Converter` directory run `buildLinux.ps1` bash script as followed:\n\n```bash\ngit clone https://github.com/EdoardoTosin/Batch-Image-Converter.git\ncd Batch-Image-Converter\n./tools/buildLinux.sh\n```\n\nThese scripts will automatically build the binaries for the corresponding platform.\n\n## Method 3: Run with Python3\n\nFirst, clone the repository:\n\n```bash\ngit clone https://github.com/EdoardoTosin/Batch-Image-Converter.git\n```\n\nNext, navigate into the cloned repository:\n\n```bash\ncd Batch-Image-Converter\n```\n\nAfterwards, install the required Python packages using the `requirements.txt` file:\n\n```bash\npip3 install -r requirements.txt\n```\n\nOnce you have installed the required packages and are ready to run the script, you need to move the `main.py` file from the `src` directory into the folder where you want to convert images.\n\nOn Linux, use the `mv` command:\n\n```bash\nmv src/main.py /path/to/your/folder\n```\n\nOn Windows, use the `move` command:\n\n```powershell\nMove-Item -Path \"src\\main.py\" -Destination \"\\path\\to\\your\\folder\"\n```\n\nAfter moving the `main.py` file, navigate to the folder where you moved the file and run the script:\n\nOn Linux:\n\n```bash\ncd /path/to/your/folder\npython3 main.py --help\n```\n\nOn Windows:\n\n```powershell\ncd \\path\\to\\your\\folder\npython main.py --help\n```\n\n## Usage\n\nThe script takes several command line arguments:\n\n- `-p` or `--path`: Specify the directory where the images are located. Defaults to the current directory.\n- `-d` or `--dpi`: Specify the pixel density in pixels per inch (dpi). Must be in the range 1-1000. Defaults to 72.\n- `-s` or `--size`: Specify the maximum resolution of the image (long side) in pixels. For downscaling only. Must be in the range 1-10000. Defaults to 1000.\n- `-f` or `--filter`: Specify the type of filter used for downscaling. Must be an integer in the range 0-5. Defaults to 0 (Nearest). ([Filters comparison table](https://pillow.readthedocs.io/en/stable/handbook/concepts.html#filters-comparison-table))\n- `--colorspace` or `--cs`: Convert all images to RGB color space.\n- `-q` or `--quality`: Specify the quality of output images. Must be in the range 1-100. Values above 95 should be avoided. Defaults to 80.\n- `-m` or `--max-image-mpixels`: Specify the maximum images resolution allowed in Megapixel. Defaults to 0 (None).\n- `--optimize`: Attempt to compress the palette by eliminating unused colors.\n- `--alert`: Play alert sound when finished the conversion.\n- `--wait`: Wait for user keypress (Enter) when finished the conversion.\n\n## Security Policy\n\nFor more details see the [SECURITY](https://github.com/EdoardoTosin/Batch-Image-Converter/blob/main/SECURITY.md) file.\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/EdoardoTosin/Batch-Image-Converter/tree/main/CONTRIBUTING.md).\n\n## License\n\nThis software is released under the terms of the GNU General Public License v3.0. See the [LICENSE](https://github.com/EdoardoTosin/Batch-Image-Converter/tree/main/LICENSE) file for further information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoardotosin%2Fbatch-image-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedoardotosin%2Fbatch-image-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoardotosin%2Fbatch-image-converter/lists"}