Skip to content

amirhnajafiz-university/S6MM01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S6MM01


Compress our images into JPEG standard. Using YCrCb, Chroma Subsampling, Quantization, RLC and Huffman algorithms. My first project of Multimedia systems course.

How to use?

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.