I have some jpeg data which is missing the original file headers. The files don't start at the beginning of the file, they start at the data scan portion of the file and end with the file closing tag "FF D9". I might not be able to make or find a similar enough file header to repair each file with a hex editor. I want to find or create a large collection of jpeg headers and pre-pend each one to a data portion to check if I can form a working jpeg with the tested header. Is there such a collection or library of jpeg headers known to you? Do you know if there is a universal kind of minimal jpeg header which will work with a wide variety of jpeg data segments? I have heard mentioned that there is such a header which works with jpegs taken by a cheap webcam. It was the cheapest kind of Chinese manufactured webcam from 2007-2011 era. The stills taken with this kind of webcam apparently use the same basic header, if I am not mistaken. I don't remember the brand name or the specs. I think that it is only jfif, not exif. I am working on some python code which will pre-pend each header, but it would be better if I could just test each header without saving a file and then checking each file manually. Later I will post some code of how I am trying to do this.
Asked
Active
Viewed 190 times
0
-
Try [this decoder](https://github.com/xbarin02/jpeg). It does not require definition of Huffman tables. – DaBler Dec 10 '20 at 15:58
-
Alternatively, can you share one of those files? – DaBler Dec 10 '20 at 19:40
-
I can’t share an example file, it represents intellectual property which must remain confidential for security reasons. I can post a file doctored to have the same defects as a sample file. – stacker Dec 24 '20 at 23:07
-
OK, post the doctored file... – DaBler Dec 25 '20 at 06:45