summaryrefslogtreecommitdiffstats
path: root/contrib/file/magic/Magdir/jpeg
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/magic/Magdir/jpeg')
-rw-r--r--contrib/file/magic/Magdir/jpeg106
1 files changed, 13 insertions, 93 deletions
diff --git a/contrib/file/magic/Magdir/jpeg b/contrib/file/magic/Magdir/jpeg
index 1c7156f..cfe8973 100644
--- a/contrib/file/magic/Magdir/jpeg
+++ b/contrib/file/magic/Magdir/jpeg
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: jpeg,v 1.21 2014/09/12 20:47:00 christos Exp $
+# $File: jpeg,v 1.25 2015/01/02 16:56:50 christos Exp $
# JPEG images
# SunOS 5.5.1 had
#
@@ -31,98 +31,9 @@
# Next, show thumbnail info, if it exists:
>>18 byte !0 \b, thumbnail %dx
>>>19 byte x \b%d
-
-# EXIF moved down here to avoid reporting a bogus version number,
-# and EXIF version number printing added.
-# - Patrik R=E5dman <patrik+file-magic@iki.fi>
->6 string Exif \b, EXIF standard
-# Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD.
-# All possible combinations of entries have to be enumerated, since no looping
-# is possible. And both endians are possible...
-# The combinations included below are from real-world JPEGs.
-# Little-endian
->>12 string II
-# IFD 0 Entry #5:
->>>70 leshort 0x8769
-# EXIF IFD Entry #1:
->>>>(78.l+14) leshort 0x9000
->>>>>(78.l+23) byte x %c
->>>>>(78.l+24) byte x \b.%c
->>>>>(78.l+25) byte !0x30 \b%c
-# IFD 0 Entry #9:
->>>118 leshort 0x8769
-# EXIF IFD Entry #3:
->>>>(126.l+38) leshort 0x9000
->>>>>(126.l+47) byte x %c
->>>>>(126.l+48) byte x \b.%c
->>>>>(126.l+49) byte !0x30 \b%c
-# IFD 0 Entry #10
->>>130 leshort 0x8769
-# EXIF IFD Entry #3:
->>>>(138.l+38) leshort 0x9000
->>>>>(138.l+47) byte x %c
->>>>>(138.l+48) byte x \b.%c
->>>>>(138.l+49) byte !0x30 \b%c
-# EXIF IFD Entry #4:
->>>>(138.l+50) leshort 0x9000
->>>>>(138.l+59) byte x %c
->>>>>(138.l+60) byte x \b.%c
->>>>>(138.l+61) byte !0x30 \b%c
-# EXIF IFD Entry #5:
->>>>(138.l+62) leshort 0x9000
->>>>>(138.l+71) byte x %c
->>>>>(138.l+72) byte x \b.%c
->>>>>(138.l+73) byte !0x30 \b%c
-# IFD 0 Entry #11
->>>142 leshort 0x8769
-# EXIF IFD Entry #3:
->>>>(150.l+38) leshort 0x9000
->>>>>(150.l+47) byte x %c
->>>>>(150.l+48) byte x \b.%c
->>>>>(150.l+49) byte !0x30 \b%c
-# EXIF IFD Entry #4:
->>>>(150.l+50) leshort 0x9000
->>>>>(150.l+59) byte x %c
->>>>>(150.l+60) byte x \b.%c
->>>>>(150.l+61) byte !0x30 \b%c
-# EXIF IFD Entry #5:
->>>>(150.l+62) leshort 0x9000
->>>>>(150.l+71) byte x %c
->>>>>(150.l+72) byte x \b.%c
->>>>>(150.l+73) byte !0x30 \b%c
-# Big-endian
->>12 string MM
-# IFD 0 Entry #9:
->>>118 beshort 0x8769
-# EXIF IFD Entry #1:
->>>>(126.L+14) beshort 0x9000
->>>>>(126.L+23) byte x %c
->>>>>(126.L+24) byte x \b.%c
->>>>>(126.L+25) byte !0x30 \b%c
-# EXIF IFD Entry #3:
->>>>(126.L+38) beshort 0x9000
->>>>>(126.L+47) byte x %c
->>>>>(126.L+48) byte x \b.%c
->>>>>(126.L+49) byte !0x30 \b%c
-# IFD 0 Entry #10
->>>130 beshort 0x8769
-# EXIF IFD Entry #3:
->>>>(138.L+38) beshort 0x9000
->>>>>(138.L+47) byte x %c
->>>>>(138.L+48) byte x \b.%c
->>>>>(138.L+49) byte !0x30 \b%c
-# EXIF IFD Entry #5:
->>>>(138.L+62) beshort 0x9000
->>>>>(138.L+71) byte x %c
->>>>>(138.L+72) byte x \b.%c
->>>>>(138.L+73) byte !0x30 \b%c
-# IFD 0 Entry #11
->>>142 beshort 0x8769
-# EXIF IFD Entry #4:
->>>>(150.L+50) beshort 0x9000
->>>>>(150.L+59) byte x %c
->>>>>(150.L+60) byte x \b.%c
->>>>>(150.L+61) byte !0x30 \b%c
+>6 string Exif \b, Exif standard: [
+>>12 indirect/r x
+>>12 string x \b]
# Jump to the first segment
>(4.S+4) use jpeg_segment
@@ -158,6 +69,12 @@
>0 beshort 0xFFC4
>>(2.S+2) use jpeg_segment
+>0 beshort 0xFFE1
+#>>(2.S+2) use jpeg_segment
+>>4 string Exif \b, Exif Standard: [
+>>>10 indirect/r x
+>>>10 string x \b]
+
# Application specific markers
>0 beshort&0xFFE0 =0xFFE0
>>(2.S+2) use jpeg_segment
@@ -170,6 +87,9 @@
>0 beshort&0xFFD0 =0xFFD0
>>(2.S+2) use jpeg_segment
+#>0 beshort x unknown 0x%x
+#>>(2.S+2) use jpeg_segment
+
# HSI is Handmade Software's proprietary JPEG encoding scheme
0 string hsi1 JPEG image data, HSI proprietary
OpenPOWER on IntegriCloud