FileTypeDetector icon indicating copy to clipboard operation
FileTypeDetector copied to clipboard

jpeg/exif support

Open black-silence opened this issue 4 years ago • 0 comments

Hi, I found that the detector does not recognize all jpeg because some use the header FFD8FFE1 instead of FFD8FFE0.

I found an explanation here: https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files#21-Exif

$ file FA.jpg 
FA.jpg: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=0], progressive, precision 8, 1200x600, components 3
$ xxd FA.jpg 
00000000: ffd8 ffe1 0018 4578 6966 0000 4949 2a00  ......Exif..II*.
00000010: 0800 0000 0000 0000 0000 0000 ffec 0011  ................
00000020: 4475 636b 7900 0100 0400 0000 3c00 00ff  Ducky.......<...
00000030: e104 6368 7474 703a 2f2f 6e73 2e61 646f  ..chttp://ns.ado
00000040: 6265 2e63 6f6d 2f78 6170 2f31 2e30 2f00  be.com/xap/1.0/.

https://en.wikipedia.org/wiki/List_of_file_signatures Wikipedia also lists a jpeg raw header

black-silence avatar Dec 30 '20 14:12 black-silence