Skip to content

HoangPhungz25/JPEG_Compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo result

Zoom them yourself to see the differences.

  • Image before compression: 6000 x 3376 , 11,6MB
  • Image after compression: 1,23MB

Project Structure: classes

  • Main:
    • Create path to input image, output location
    • Call JPEG_Compress class
  • JPEG_Compress
    • Read Image from path get from Main
    • Compress
    • Export to output path get from Main
  • BitCode
    • A class for a huffman code, contain 2 atributes: code word and number of bit that demonstrates the code word
  • BitBuffer
    • A class use to store bit sequence generated in Run Length Encoding and Huffman Encoding processes.
    • It contains 2 atributes: the buffer (a int number), and the number of bit that still in the buffer, waiting there to write out.

Technical espects

  • work flow
  • JPG file structure
  • Use default quantization table for 50% quality lost.
  • Use standard huffman table that encodes the length of value instead of value it self.
  • Works with: 3 color system image.
  • No subsampling
  • JFIF : 1.1
  • It works well when compress larg size image, bring a high compression ratio, but it has a really little effect on small size image.
  • Works well with non-text image.

Issues

  1. UI: we have no UI, this should be consider at last.
  2. Bad performance (comment the console log to avoid IO block, increase performance)

Documents

About

Multimedia project: uống trà nhúng hương dâu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages