Using exiftool to process corrupt files

Started by pizzijw, February 07, 2020, 02:00:56 PM

Previous topic - Next topic

pizzijw

I have several files which appear to have been created by concatenating multiple images together. I've used the htmldump option to dump information from one of these files, and it shows significant information after the JPEG EOI.

Any suggestions on how I can get these pictures separated into their individual pictures? A naive approach let me to separating thumbnails from the image (that approach didn't use exiftool for any processing, just validating that the file was truly a JPEG).

Joe

Phil Harvey

Hi Joe,

With ExifTool 11.87 you will be able to do this to un-concatenate JPG images:

exiftool -trailer -b FILE > 1.jpg

exiftool -trailer -b 1.jpg > 2.jpg

exiftool -trailer -b 2.jpg > 3.jpg

etc...

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jaff

You can use Multi Ripper

  • if standard JFIF header of JPEG is present - https://github.com/matteobaccan/MultiRipper/releases
  • or use a user search with 0xFFD8FFE1 and leave USR at extension. Rename ripped files to .JPG. If you put in mripper JPG extension, it will rip only thumbnail!
Sometimes I still use the old v2.20 (made in 1997) with desired results.  ;D

Another alternate solution is to use JPEGsnoop to extract found JPEGs.