i have made a program to recover the jpegs i.e. resize.c . The code is : http://pastebin.com/B0XkP9i9 the check 50 results: check50 2016.recover recover.c :) recover.c exists :) recover.c compiles :) handles lack of forensic image :( recovers 000.jpg correctly \ expected 000.jpg to exist :( recovers middle files correctly \ expected 001.jpg to exist :( recovers last file correctly \ expected 015.jpg to exist https://sandbox.cs50.net/checks/ac3b215a224e4010ab0a4091fb631716

  • Where is *outptr = fopen(... ? Feb 16 '17 at 17:45
  • i used *img instead of *outptr Feb 17 '17 at 4:00

Perhaps there are other ploblems too, but this line "if (fread(buffer,512,1,inptr)==512)" evaluates just one time and exits immediately. you never go to the first for loop. Run the debud50 to check it. If you want to have it evaluated to true, remove the comparison.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .