This program allows the user to perform various image processing operations on PPM (Portable Pixmap) format images. Supported operations include converting to grayscale, creating a negative, adjusting brightness, rotating the image, and applying an aging effect.
- Grayscale Conversion: Converts the image to grayscale using luminosity method.
- Negative Image: Generates the negative of the image.
- Brightness Adjustment: Increases or decreases the image brightness.
- Image Rotation: Rotates the image by 90 degrees.
- Aging Effect: Applies an aging effect, reducing the brightness slightly.
To compile and run this program, you need a C compiler (like GCC) and a standard C library.
Compile the program using the following GCC command:
gcc -o ppm-editor ppm-editor.c
Run the program using:
./image_processor
The program expects a file name of the PPM image as input. It reads the PPM file, applies selected effects based on user choices, and outputs a new PPM file named resultado.ppm. Output Outputs the processed image in PPM format as resultado.ppm. The image will have the same dimensions and format as the input unless rotated (dimensions will swap).
- Only supports PPM format.
- There's minimal error handling for file operations.
Here is how to use the program:
- Compile the program.
- Run the executable
- Enter the filename of the PPM image
- Choose the effects you want to apply one by one
- The final image will be saved as resultado.ppm