This project provides a command-line tool for applying various image filters to bitmap images. The tool supports grayscale, sepia, reflection, and blur effects.
Compiler: gcc or clang (for compiling the source code)
To compile the source code, use the following command:
For gcc:
gcc -ggdb3 -gdwarf-4 -O0 -std=c11 -Wall -Werror -Wextra -Wno-gnu-folding-constant -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -lm -o filter filter.c helpers.c
For clang:
clang -ggdb3 -gdwarf-4 -O0 -std=c11 -Wall -Werror -Wextra -Wno-gnu-folding-constant -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -lm -o filter filter.c helpers.c
This command will generate an executable named filter.
You can apply different filters to your images using the following commands:
Grayscale: Convert an image to grayscale:
./filter -g ./images/courtyard.bmp ./images/courtyard-grayscale.bmp
Sepia: Apply a sepia tone to an image:
./filter -s ./images/stadium.bmp ./images/stadium-sepia.bmp
Reflection: Create a horizontally reflected version of an image:
./filter -r ./images/tower.bmp ./images/tower-reflected.bmp
Blur: Apply a blur effect to an image:
./filter -b ./images/yard.bmp ./images/yard-blurred.bmp
-g: Apply grayscale filter -s: Apply sepia filter -r: Apply reflection filter -b: Apply blur filter
Ensure that the input image files are located in the ./images/ directory and that the output paths specified are correct.