On 4/13/05, Offer Kaye <[EMAIL PROTECTED]> wrote: > On 4/13/05, Jay Savage wrote: > > > > I'm thinking now that I should probably just take what I can get from > > the recovery I have, and postprocess the recovered files, instead of > > trying to get the recovery itself to be clean. > > > > Silly question probably, but why don't you take everything from one > $magic to the next, if you assume multiple jpegs in one file, instead > of looking for the EOI (since you can't find it)? Each such block will > then be, I assume, a (possibly corrupt) jpeg. > > -- > Offer Kaye
Well, that's what I do now. I'm trying to expand the functionality. Why? For two reasons. 1) the resulting files will be better formed. SOI-SOI searches produces files with large numbers of trailing null bytes or, worse, garbage that can be misinterpreted, and 2) the final file recovered takes everything from the last SOI/ magic number to the end of the device image. My sample disk image, for instance, is a 256MB CF card. The final jpeg starts at 166MB. Since I can't find EOI/EOF, the recovered jpeg gobbles everything to the end of the image, making it 90MB, most of which is garbage. That's a huge file to work with--at least on my equipment--especially since it's corrupted. --jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>