This program applies various filters to BMP images. It supports the following filters:
- Blur (b)
- Grayscale (g)
- Reflection (r)
- Sepia (s)
To use the program, run the following command:
./filter [flag] infile outfileReplace [flag] with the filter flag (e.g., b for blur, g for grayscale, etc.), infile with the input BMP file, and outfile with the output BMP file.
To blur an image named input.bmp and save the result as output.bmp, use the following command:
./filter b input.bmp output.bmp- Standard C library (
stdio.h,stdlib.h) getopt.hfor command-line argument parsinghelpers.hfor image processing functionsmath.hfor round function
To build the program, compile using the Makefile:
make filter- The input image must be a 24-bit uncompressed BMP 4.0 file.
- Only one filter can be applied at a time.