/Convert-My-Images

A Python Program which will let you Convert your Images in Bulk.

Primary LanguagePythonMIT LicenseMIT

Banner

๐ŸŒŸ Convert-My-Images ๐ŸŒŸ

๐Ÿ‘‘ An Open Source Project ๐Ÿ‘‘ Built with Python ๐Ÿ



Convert-My-Images License Convert-My-Images Forks Convert-My-Images Stars Convert-My-Images Issues Convert-My-Images Pull Requests Convert-My-Images Repo Size

๐Ÿ’ป Compatible with all the Linux Distros and MacOS ๐Ÿ’ป

Specifically Tested on MacOS, RHEL and Ubuntu



๐Ÿ›ฐ๏ธ Description / How the tool works ?

Language: Python
Libraries Used: PILLOW, os, sys


FAQs:

  1. 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.

  2. 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 ๐Ÿฅ‚



๐Ÿ› ๏ธ Installation Steps (All Linux Distros and MacOS)

1. Clone the Repository

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 *

3. Just run the Install Script

./install.sh



๐Ÿ› ๏ธ Installation Steps (Windows)

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:

1. Clone the Repository

git clone https://github.com/ajayagrawalgit/Convert-My-Images.git

2. Go Inside the Cloned Repository and Run the Python File directly using the command below:

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.





โ— How to Use ? ๐Ÿฆพ

Using the tool is pretty easy to be honest ๐Ÿ’ซ Please read the instructions below according to your OS:๏ธ

For all Linux Distros and MacOS:

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.



For Windows:

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





๐Ÿงถ Supported Image Formats

Converts Images from and to below formats:

  • PNG
  • JPEG
  • PPM
  • GIF
  • TIFF
  • BMP


๐ŸŽŠ Future Updates

  • Add support for more Image Formats.
  • Better Path Handling according to the OS Type.
  • Beautify the text displayed on the terminal.


๐Ÿง‘๐Ÿป Know Me More

Developer - Ajay Agrawal



๐Ÿค Support Me ๐Ÿค

Buy me a Coffee



Made with โ™ฅ๏ธ in India