Code Monkey home page Code Monkey logo

jpeg-codec's Introduction

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

jpeg-codec's People

Contributors

samir-nasibli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.