From: Christos Zoulas Date: Fri, 1 Dec 2000 21:19:01 +0000 (+0000) Subject: fix jpeg recognition. X-Git-Tag: FILE3_34~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d095f686d5c81b46e53d9183dd50eed8716387b4;p=file fix jpeg recognition. --- diff --git a/magic/Magdir/images b/magic/Magdir/images index b5b4e0c3..3d8fc982 100644 --- a/magic/Magdir/images +++ b/magic/Magdir/images @@ -162,19 +162,6 @@ # Conflicts with other entries [BABYL] #0 string BA PC bitmap array data -# JPEG images -# SunOS 5.5.1 had -# -# 0 string \377\330\377\340 JPEG file -# 0 string \377\330\377\356 JPG file -# -# both of which turn into "JPEG image data" here. -# -0 beshort 0xffd8 JPEG image data ->6 string JFIF \b, JFIF standard -# HSI is Handmade Software's proprietary JPEG encoding scheme -0 string hsi1 JPEG image data, HSI proprietary - # XPM icons (Greg Roelofs, newt@uchicago.edu) # note possible collision with C/REXX entry in c-lang; currently commented out 0 string /*\ XPM\ */ X pixmap image text diff --git a/magic/Magdir/jpeg b/magic/Magdir/jpeg index 089405a6..e8540f87 100644 --- a/magic/Magdir/jpeg +++ b/magic/Magdir/jpeg @@ -10,7 +10,6 @@ # 0 beshort 0xffd8 JPEG image data >6 string JFIF \b, JFIF standard - # The following added by Erik Rossen 1999-09-06 # in a vain attempt to add image size reporting for JFIF. Note that these # tests are not fool-proof since some perfectly valid JPEGs are currently @@ -22,8 +21,8 @@ >13 byte 0 \b, aspect ratio >13 byte 1 \b, resolution (DPI) >13 byte 2 \b, resolution (DPCM) ->14 beshort x \b X%d: ->16 beshort x \bY%d +>14 beshort x \b, %d x +>16 beshort x \b %d #>4 beshort x \b, segment length %d # Next, show thumbnail info, if it exists: >18 byte !0 \b, thumbnail %dx