Source code of JPEG-Decoder for ITCT course
To build and run this project, you will need:
- CMake (version 3.10 or higher)
- A C++ compiler that supports C++17
To build the project, follow these steps:
- Clone the repository to your local machine.
- Navigate to the root directory of the project.
- Create a new directory for the build:
$ cd ./r11944040-JPEG-Decoder
$ mkdir build
$ cd build
$ cmake ..
$ make JPEGDecoder
After a successful build, you should have the JPEGDecoder
executable in the build directory.
To decode a .jpg
image to a .bmp
image, use the following command:
./JPEGDecoder <input.jpg> <output.bmp>
To automatically convert all .jpg
images in the Image
directory, you can use the provided shell script convert_images.sh
. This script will process each image and generate a corresponding .bmp file in the same directory.
First, ensure that the script is executable:
chmod +x convert_images.sh
Then run the script:
./convert_images.sh
The JPEGDecoderDebug executable is built with debug messages enabled. It prints detailed information about the decoding process of MCU(0, 0) at every stage, which can be useful for development and debugging purposes.
To build the debug version, run:
make JPEGDecoderDebug
Then, to run the debug version and see the debug messages, use:
./JPEGDecoderDebug <input.jpg> <output.bmp>