]> granicus.if.org Git - file/commitdiff
Add OS/2 pointer images (Joerg Jenderek)
authorChristos Zoulas <christos@zoulas.com>
Mon, 24 Jun 2019 23:50:11 +0000 (23:50 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 24 Jun 2019 23:50:11 +0000 (23:50 +0000)
magic/Magdir/images

index 3bbe29231c96096c3e78ab346e22b989bac1d3a6..c65069fc703f7fea6e56585190e1c3031d72c7b0 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: images,v 1.162 2019/06/19 15:19:09 christos Exp $
+# $File: images,v 1.163 2019/06/24 23:50:11 christos Exp $
 # images:  file(1) magic for image formats (see also "iff", and "c-lang" for
 # XPM bitmaps)
 #
 # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
 #>>14  ulelong         x               \b, dib header size %u
 #0     string          CP              PC color pointer image data
+# URL:         http://fileformats.archiveteam.org/wiki/OS/2_Pointer
+# Reference:   http://www.fileformat.info/format/os2bmp/egff.htm
+0      string          CP
+# skip CPU-Z Report by checking for valid dib header sizes 12 or 64
+>14    ulelong         <65             OS/2
+# http://extension.nirsoft.net/PTR
+!:mime image/x-ibm-pointer
+!:ext  ptr
+>>14   ulelong         12              1.x color pointer
+# image width and height fields are unsigned integers for OS/2
+>>>18  uleshort        x               %u x
+# stored height = 2 * real height
+>>>20  uleshort/2      x               %u
+# number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found
+>>>24  uleshort        >1              x %u
+# color planes; must be 1
+#>>>22 uleshort        >1              \b, %u color planes
+>>14   ulelong         64              2.x color pointer
+# image width and height
+>>>18  ulelong         x               %u x
+# stored height = 2 * real height
+>>>22  ulelong/2       x               %u
+# number of bits per pixel (color depth). only 1 found
+>>>28  uleshort        >1              x %u
+#>>>26 uleshort        >1              \b, %u color planes
+# compression method: 0~no 3~Huffman 1D
+>>>30  ulelong         3               \b, Huffman 1D compression
+#>>>30 ulelong         >0              \b, %u compression
+# xHotspot, yHotspot; coordinates of the hotspot like 0 3 4 8 15 16 23 27 31
+>>6    uleshort                x       \b, hotspot %ux
+>>8    uleshort                x       \b%u
+# cbSize; size of header or maybe file in bytes like 1Ah 4Eh
+>>2    ulelong                 x       \b, cbSize %u
+#>>2   ulelong                 x       \b, cbSize %x
+# offBits; offset to bitmap data (pixel array) like 6Ah A4h E4h 4A4h
+>>10   ulelong                 x       \b, bits offset %u
+#>>10  ulelong                 x       \b, bits offset 0x%x
+#>>(10.l) ubequad              !0      \b, bits 0x%16.16llx
+# dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
+#>>14  ulelong         x               \b, dib header size %u
 # Conflicts with other entries [BABYL]
 #0     string          BA              PC bitmap array data