This project implements a Vector Quantization Image Compression Algorithm with a Java Swing GUI. The algorithm aims to compress images using vector quantization, and the graphical user interface provides a convenient way to interact with the compression and decompression processes.
The Models
package contains the models of the Vector Quantization algorithm.
The Logic
package contains the core implementation of the Vector Quantization algorithm.
The GUI
package contains the graphical user interface components.
- Run the program using the following command in the CLI, and a GUI window will appear:
git clone https://github.com/moheladwy/VectorQuantization.git VectorQuantization cd VectorQuantization javac Program.java java Program.class
- Click the "Browse" button to choose an image for compression.
- Press the "Compress" button to initiate the compression process.
- The compressed image will be displayed along with relevant information.
- Click the "Clear Image" button to reset and choose a new image.
- Java Swing
- BufferedImage
- File I/O
- Java Collections Framework
- Ensure that the chosen image has one of the following extensions:
jpg
,jpeg
,png
,bmp
,gif
. - The compressed image will be saved in the same directory as the original with the filename appended "_compressed".
Feel free to explore and modify the code to suit your needs. If you have any questions or suggestions, please contact me on my email: mohamed.h.eladwy@gmail.com