#include <stdio.h>
#include <stdlib.h>
#include "imageio.h"
#include "imageio.c"
int main()
{
int i,j;
IMAGE image = loadImage("test.bmp");
printf("Enter the number of pixels in the x axis: ");
scanf("%d", &image.width);
printf("Enter the number of pixels in the y axis: ");
scanf("%d", &image.height);
for (i=0;i<image.width; i++)
for (j=0;j<image.height; j++){
RGB pixel = image.pixels[i][j];
pixel.R = pixel.R * 0.299;
pixel.G = pixel.G * 0.587;
pixel.B = pixel.B * 0.114;
image.pixels[i][j] = pixel;
}
saveImage("modified_test.bmp", image);
}
#include <stdio.h>
#include <stdlib.h>
#include