This program processes BMP images by transforming them into grayscale images and applying dithering to the resulting image.
This program requires the following:
- C++ compiler (GCC or Clang recommended)
- BMP image file (24-bit depth)
- Clone this repository to your local machine using https://github.com/username/bmp-image-processing.git
- Compile the program with your C++ compiler using the bmp.cpp file. Copy code
g++ bmp.cpp -o bmp
- Run the program with an input image. The output image will be saved as resultImage.png.
The program takes an input BMP image and performs grayscale and dithering operations on the image.
To load the input BMP image, use the Image.load() function:
Image input;
input.load("lena.bmp");
To convert the input image to grayscale, use the grayscale() function:
Image output = grayscale(input);
To apply dithering to the grayscale image, use the dithering() function:
Image output = dithering(input);
To save the output image, use the Image.save() function:
output.save("resultImage.png");
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This project is licensed under the MIT License - see the LICENSE file for details.