Image Compressor is a versatile tool that can compress any type of image located within a specified folder. Here are some reasons why you should choose Image Compressor:
This tool is available for use without an internet connection. We will never collect any data, meaning that your files are safe and secure. You can use this tool to compress private files without any worries!
You can compress as many files as you need to, and there is no speed limit to the compression process! The speed of compression is entirely dependent on your computer's specifications.
Don't worry about the file extension (jpg, jpeg, png, etc.). Image Compressor can compress any combination of formats without need for additional specifications!
Simply specify the folder where your files are located and the folder where you want to save the compressed images. You don't have to select each file individually. Additionally, the program offers two support options: console and graphical, making it perfect for both programmers and everyday users.
Image Compressor is completely free to use, so you don't have to spend any money on image compression software. Despite being free, it delivers high-quality image compression and fast results, so you can compress your images quickly and efficiently!
Download the latest release executable of Image Compressor: ImageCompressor.exe
Double click on the "ImageCompressor.exe" executable file to run Image Compressor.
Download the latest release executable of Image Compressor: ImageCompressor
Run it with the following command:
sudo ./ImageCompressor
To use the Image Compressor tool, follow these steps:
-
Run "ImageCompressor.exe" to open the main menu:
-
Click on the "Select Folder" button to choose the folder containing the images you want to compress. You can check the currently selected directory at the bottom of the window:
-
After selecting the folder, click on the "Compress" button to begin the compression process.
-
Once the compression is complete, the tool will automatically close after 2 seconds.
- Python 3.x
- PIL Library
python3 imagecompressor.py "/input_folder" "/output_folder" [QualityFactor (0:95)]
Note: Make sure to enclose the folder paths in double quotes ("path") and use forward slashes (/) for folder paths.
input_folder
: The folder containing the images that need to be compressed.output_folder
: The folder where the compressed images will be saved.QualityFactor (optional)
: An integer value from 0 (worst quality) to 95 (best quality) that determines the level of compression to apply. If not specified, the default value of 5 will be used.
Suppose you have a folder named /home/USER/ImageCompressor/test/input
that contains several images you want to compress, and you want to save the compressed images to a folder named /home/USER/ImageCompressor/test/output
. You want to use a quality factor of 30 for the compression.
-
Open a terminal or command prompt in the directory where the script is located.
-
Run the following command:
python3 imagecompressor.py "/home/USER/ImageCompressor/test/input" "/home/USER/ImageCompressor/test/output" 30
Alternatively, if you are already located in the "/home/USER/ImageCompressor/" directory, you can run the following command (not recommended*):
python3 imagecompressor.py "/test/input" "/test/output" 30
*Note: If the output folder doesn't exist, it will be created without the pwd.
The script will compress all the images in the /home/USER/ImageCompressor/test/input
folder and save the compressed images to the /home/USER/ImageCompressor/test/output
folder, using a quality factor of 30. Once the compression is complete, a message will be displayed indicating that the process is completed.
- Python 3.x
- PIL Library
- Pyinstaller
Note that there are pre-built versions available for Windows and Linux (tested on Debian) in the "Releases" section. If you prefer to build the application yourself, follow the steps below.
- Open a terminal and navigate to the main folder of the project.
- Run the following command:
- Once the compression is complete, the tool will automatically close after 2 seconds.
pyinstaller --onefile --name=ImageCompressor ./src/megerd.py
- To execute:
-
On Linux:
sudo ./dist/ImageCompressor
-
On windows:
Navigate to the "dist" folder and double-click on ImageCompressor.exe
-
Open a terminal and navigate to the main folder of the project.
-
Run the following command to create the build, dist, and .spec files:
pyinstaller --onefile --name=ImageCompressor ./src/graphicinterface.py
-
Modify the "ImageCompressor.spec" file with the following contents (just replace a):
a = Analysis(['./src/graphicinterface.py'], pathex=['./src'], binaries=[], datas=[('./src/imagecompressor.py', '.')], hiddenimports=[], hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=None, noarchive=False)
-
Run the following command to build the executable:
pyinstaller ImageCompressor.spec
-
To execute on Linux just do:
sudo ./dist/ImageCompressor
-
Does this program copy empty (0 bit) images?
No, empty images are not copied.
-
What image formats are supported by ImageCompressor?
ImageCompressor supports the same image formats as the Pillow library, which includes popular formats such as JPEG, PNG, BMP, GIF, and TIFF, among others.
This project is licensed under the MIT License - see the LICENSE.md file for details.