Compress our images into JPEG standard. Using YCrCb, Chroma Subsampling, Quantization, RLC and Huffman algorithms. My first project of Multimedia systems course.
Clone into the repository:
git clone https://github.com/amirhnajafiz/JPEG-compression.git
After that install the dependencies:
pip install -r requirements.txt
Put your images in in directory.
Now run the project:
python main.py
Enter the file name:
[Enter the file path] > myfile.png
Now you should have these files in out directory:
|_ out/
|_ myfile.asfh (compressed file)
|_ encode_myfile.pickle
|_ htrees_myfile.pickle
You can see the image codes in encode_myfile.pickle and huffman trees in htrees_myfile.pickle.