Every time I try to compile my code to check grayscale, I put in the input they gave in the instructions:
./filter -g infile.bmp outfile.bmp
But I keep getting this message saying
Could not open infile.bmp.
How do I compile this to check it?
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
That's simple because infile.bmp does not exist, that is just a placeholder it means that, that the path you put in there should contain a file. The folder images has images where you could process or filter. Try doing ./filter -g images/tower.bmp images/greytower.bmp. This basically means ./filter will run your program, -g will state that you want to use the grayscale function, images/tower.bmp is the path where the file you want to filter will be, then images/greytower.bmp is the path and the filename you want to place the filtered image. if you run that you should see in your images folder a file called greytower.bmp, and if your code is correct then if you view the image it should be grayscaled.