Skip to content

samir-nasibli/jpeg-codec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple JPEG encoder/decoder

I implemented application which perform the following:

  • reads JPEG image file as input;
  • performs decoding JPEG image;
  • performs encoding of decoder’s output data to the JPEG format;
  • stores encoded JPEG image to the file.

Install

You will need to install libJPEG first.

 sudo apt install libjpeg-dev

Also you need to install Intel TBB library for parallelism.

Donwload this repository and run make file. It generates two console programs: invert and compress.

Interface

compress -- console program with minimal interface, which reads JPEG file, decodes JPEG image, compress with given number of quality and stores JPEG image to the file.

invert -- console program with minimal interface, which reads JPEG file, decodes JPEG image, inverts image pixels, compress with given number of quality and stores JPEG image to the file.

  • invert [name of original jpeg file] [name of output jpeg file] [quality number - int]
  • compress [name of original jpeg file] [name of output jpeg file] [quality number - int]
  • NOTE: you need to specify all parameters correct

Examples:

invert cars.jpeg invertCars.jpeg 34
compress cars.jpeg comprCars.jpeg 24
Original image Inverted image

Updates

27.12.2018:

  • now class Image uses one single vector instead of vector of vectors for bit map image;
  • parallelInvert() method was added in the class Image. It does the same as invert(), only twice (1.5-2.0 times) as fast on average. This result is achieved through the use TBB library functions and template classes. (full description will be added)
  • some exceptions are handled (full description will be added later)
  • other (full description will be added later)

25.01.2019:

  • stdInvert() was added, that uses std::threads for multithreading.

To-dos

  • Write Google Tests
  • Handle exceptions
  • Update ReadMe

Reference

Releases

No releases published

Packages

No packages published