My recover program is able to output all 16 jpg but the structure seems off as it states SOS before SOF. I'm guessing the issue might be with the fwrite function but I'm unable to figure it out. I'm attaching my pseudo-code but if the original is needed I'll mail it. Thanks!
open input file
declare title[8]
declare buffer of size BLOCK
initialize img
initialise counter
open a new img filewhile not EOF
{ read data into bufferif (beginning of JPEG)
{
close previous output file if exists
open new output file
write to the file
update counter
}else if (output file exists and is not null)
append the file which is open
else
continue
}
close remaining files