bitmap
is an open-source CLI tool for reading, manipulating, and transforming bitmap image files. It provides a set of powerful features for image processing, allowing users to perform various operations on BMP files.
- Header Information: Display detailed metadata about bitmap files.
- Mirror: Flip images horizontally or vertically.
- Filter: Apply various color filters and effects to images.
- Rotate: Rotate images by specified angles.
- Crop: Trim images to desired dimensions.
- Combine: Apply multiple transformations in a single command.
- Go 1.16 or higher
git clone https://github.com/ab-dauletkhan/bitmap.git
cd bitmap
To build the project, use the provided Makefile:
make build
This will create an executable named bitmap
in the current directory.
./bitmap <command> [options] <input_file> [output_file]
-
Header Information
Display bitmap file header information:
./bitmap header sample.bmp
-
Apply Transformations
Apply various transformations to an image:
./bitmap apply [options] <input_file> <output_file>
Options:
--mirror=<direction>
: Mirror the image (horizontal/vertical)--filter=<type>
: Apply a color filter (blue/red/green/grayscale/negative/pixelate/blur)--rotate=<angle>
: Rotate the image (right/left/90/180/270/-90/-180/-270)--crop=<x>-<y>-<width>-<height>
: Crop the image
Example:
./bitmap apply --mirror=horizontal --filter=grayscale --rotate=90 --crop=20-20-100-100 input.bmp output.bmp
-
Help
Display help information:
./bitmap --help ./bitmap <command> --help
To format the code and run the project during development:
make run
To only format the code:
make format
This project is open source and available under the MIT License.
Contributions to the bitmap project are welcome! Please feel free to submit a Pull Request.