๐ An Open Source Project ๐ Built with Python ๐
Language: Python
Libraries Used: PILLOW
, os
, sys
FAQs:
-
Can I use this tool to convert a Single Image ?
Yes you can ! But as this tool is made specifically for Bulk Image Conversions, you need to create a Directory/Folder in which you store that one single image to convert and give the paths accordingly. -
How is it different from any other Image Converters which are Popular in Market ?
Offcourse ! Softwares like XnConvert, Adapter & Pixillion Image Converter Software, etc have a different place all together that cannot be denied and this tool is not at all a competition to those in any way. Consider this tool as a utility which you can may be configure in your linux/windows "servers" to automate the Image Conversion tasks/jobs if you have any of such requirements. As this is made using one of the most robust languages "Python", it can easily handle bulk conversions. Also, Cherry on the cake, it's an Open Source Software ๐
For Better Understanding, Here's a Quick Description for Convert-My-Images:
The tool accepts 4 parameters: <source_path> <destination_path> <initial_format> <final_format> Source Path: The path where all the Images you want to convert as stored. Destination Path: The path where you want to store your Converted Images. Initial Format: Now, the source Path can have multiple images having formats of more than one type. Here you need to specify the type "you" need the conversion for. Final Format: This is the format you want the Images to be converted.
Note: Please make sure you don't give the format names with a dot (.). For example, if you want to convert all the jpg images to png. the command should be like
convertmyimages /path/to/source/ /path/to/destination/ jpg png
I hope you find the Description useful. If you have any further questions, Please feel free to reach out and details for that are in Know Me More section below.
Have a great day ahead ๐ฅ
git clone https://github.com/ajayagrawalgit/Convert-My-Images.git
2. Go Inside the Cloned Repository and Change some Permissions (Changing permissions are required for some OS Types)
cd Convert-My-Images
chmod 755 *
./install.sh
Note: Make sure that GIT Works and you have Python 3 installed on your machine. If not, please download and install git from here and Python from here. Once downloaded and Installed, Please follow the steps below:
git clone https://github.com/ajayagrawalgit/Convert-My-Images.git
cd /d Convert-My-Images/src
python3 main.py
Above Command will display how to use the tool.
As we're running the Python file directly here. We don't need to actually Install the tool on our machine. If you need step by step instructions how to set up python on your windows machine. I found this website quite good. You can definitely refer to this link.
Also, if you don't want to install Git as well on your Machine, you can also consider downloading the package as a zip file directly from the GitHub itself. Refer the instructions for the same from here.
Using the tool is pretty easy to be honest ๐ซ Please read the instructions below according to your OS:๏ธ
For help:
convertmyimages -h
OR
convertmyimages --help
Tool Syntax:
convertmyimages <source_path> <destination_path> <initial_format> <final_format>
Examples:
$> convertmyimages /Users/ajay.agrawal/Downloads /Users/ajay.agrawal/Documents jpg png
$> convertmyimages /Users/ajay.agrawal/Downloads ConvertedImages png gif
Example No. 1 is pretty self-explanatory. It will convert all the Images of the extension .jpg
stored in /Users/ajay.agrawal/Downloads
and save the converted Images to /Users/ajay.agrawal/Documents
Example No. 2 is a little different. Here you can see that, The destination path is just a Name. Which may or may not be there on your present working directory. If it is present there, Offcourse the script will choose that as a destination path and even if it is not, the tool will create a directory of the name ConvertedImages
and save the Converted Images of /Users/ajay.agrawal/Downloads
to ConvertedImages
.
Don't worry ! Whatever is the case. Once you run the tool. You don't have to search for the location where the tool is saving the files as it'll provide you the path what it chooses to save the files.
Move to the src
folder and execute main.py
like stated below:
For help:
cd /d Convert-My-Images/src
python3 main.py -h
OR
python3 main.py --help
Tool Syntax (Remains the same):
convertmyimages <source_path> <destination_path> <initial_format> <final_format>
Examples:
\Convert-My-Images\src> python3 main.py D:\MyImages D:\MyImages_Converted
\Convert-My-Images\src> python3 main.py D:\MyImages MyConvertedImages
- PNG
- JPEG
- PPM
- GIF
- TIFF
- BMP
- Add support for more Image Formats.
- Better Path Handling according to the OS Type.
- Beautify the text displayed on the terminal.
Developer - Ajay Agrawal
- ๐ Profile
- ๐ฎ Email
- ๐ฆ Twitter Bot (@mickbotsays)