Skip to content

pulkitgarg04/image-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Filter

This project provides a command-line tool for applying various image filters to bitmap images. The tool supports grayscale, sepia, reflection, and blur effects.

Requirements

Compiler: gcc or clang (for compiling the source code)

Compilation

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.

Usage

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

Parameters

-g: Apply grayscale filter -s: Apply sepia filter -r: Apply reflection filter -b: Apply blur filter

Image Paths

Ensure that the input image files are located in the ./images/ directory and that the output paths specified are correct.

About

CLI based image filter maker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages