I am currently doing pset5 recover and I am getting the error mentioned in the title. My program is quite long, so I tried dimming it down, effectively only trying to recover the first image. Still, I am getting the same error. Something may be wrong with my initialisers. But really, I have no clue. I just know that somehow the jpegs are not recovered properly. Does anyone have an idea?
Make sure you don't have any spaces in your jpg filenames. I think that's what causes that error message.
Your jpg filenames should be 8 chars long 000.jpg (7 + the nul character). Are yours?
Yes, they are. I think the problem lies somewhere else. Sep 11, 2014 at 9:57
how are you creating your filename?– curiouskiwi ♦Sep 11, 2014 at 10:26
I believe that the way my filenames have been created are correct. Its funny, I seem to have solved this aspect of the problem and check50 tells me that I have successfully recovered images 0 to 48 (which is not bad). In my folder, all 50 images show up, but when I open my images, they're blank and I get this error message: ERROR interpreting JPEG image file(not a JPEG file: starts with 0xff 0x00). Actually I have encountered a similar problem, when I first attempted this pset, but then it was 0x00 0xd8. So basically the problem reversed:/ Would you mind taking a look at my whole code? Sep 11, 2014 at 20:20
never mind. Everything works now. It did turn out to be related to the filenames and scanf. Sep 11, 2014 at 20:48