I have made the below mentioned changes in my whodunit file but still the new image that is created is exactly similar to clue.bmp
someone please help...
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
What your code does is for every pixel create a variable to store the parameters of the pixel, then assign the value that you want for red, green and blue, then fread() overwrites those values with the ones of the clue.bmp, and finally fwrite() stores it in the output file. So what you are doing is copying clue.bmp, thats why looks exacly the same.
What you need to do is first create the variable, tha same way you did. Then call fread() to copy the values of clue.bmp in the variable, then you can modify the color values in the way you decide in order to enhance the message on clue.bmp. Finally use fwrite() to store the modified color values in the output file.