]> granicus.if.org Git - file/commitdiff
PR/362: Bill: Fix incorrect JPEG SOFn parsing.
authorChristos Zoulas <christos@zoulas.com>
Tue, 5 Aug 2014 07:32:31 +0000 (07:32 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 5 Aug 2014 07:32:31 +0000 (07:32 +0000)
magic/Magdir/jpeg

index 426e9430cd5429e0d9c5e203c35a1e977e9e16a4..aec8f4af3b0e72c91db4a346dcd0cb5355bfef81 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: jpeg,v 1.18 2012/08/01 12:12:36 christos Exp $
+# $File: jpeg,v 1.19 2013/02/04 15:50:03 christos Exp $
 # JPEG images
 # SunOS 5.5.1 had
 #
 >>(4.S+6)      pstring/HJ      x               "%s"
 # Or, we can show the encoding type (I've included only the three most common)
 # and image dimensions if we are lucky and the SOFn (image segment) is here:
+# from: http://www.w3.org/Graphics/JPEG/itu-t81.pdf p35
 >(4.S+5)       byte            0xC0            \b, baseline
->>(4.S+6)      byte            x               \b, precision %d
->>(4.S+7)      beshort         x               \b, %dx
->>(4.S+9)      beshort         x               \b%d
+>>(4.S+8)      byte            x               \b, precision %d
+>>(4.S+9)      beshort         x               \b, %dx
+>>(4.S+11)     beshort         x               \b%d
+>>(4.S+13)     byte            x               \b, frames %d
 >(4.S+5)       byte            0xC1            \b, extended sequential
->>(4.S+6)      byte            x               \b, precision %d
->>(4.S+7)      beshort         x               \b, %dx
->>(4.S+9)      beshort         x               \b%d
+>>(4.S+8)      byte            x               \b, precision %d
+>>(4.S+9)      beshort         x               \b, %dx
+>>(4.S+11)     beshort         x               \b%d
+>>(4.S+13)     byte            x               \b, frames %d
 >(4.S+5)       byte            0xC2            \b, progressive
->>(4.S+6)      byte            x               \b, precision %d
->>(4.S+7)      beshort         x               \b, %dx
->>(4.S+9)      beshort         x               \b%d
+>>(4.S+8)      byte            x               \b, precision %d
+>>(4.S+9)      beshort         x               \b, %dx
+>>(4.S+11)     beshort         x               \b%d
+>>(4.S+13)     byte            x               \b, frames %d
 # I've commented-out quantisation table reporting.  I doubt anyone cares yet.
 #>(4.S+5)      byte            0xDB            \b, quantisation table
 #>>(4.S+6)     beshort         x               \b length=%d