images 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. #------------------------------------------------------------------------------
  2. # $File: images,v 1.95 2014/09/22 21:21:59 christos Exp $
  3. # images: file(1) magic for image formats (see also "iff", and "c-lang" for
  4. # XPM bitmaps)
  5. #
  6. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  7. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  8. # merging several one- and two-line files into here.
  9. #
  10. # little magic: PCX (first byte is 0x0a)
  11. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  12. # by Philippe De Muyter <phdm@macqel.be>
  13. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  14. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  15. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  16. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  17. # `tgatoppm' recognizes a superset (Index may be anything)
  18. 1 belong&0xfff7ffff 0x01010000 Targa image data - Map
  19. !:strength + 2
  20. >2 byte&8 8 - RLE
  21. >12 leshort >0 %d x
  22. >14 leshort >0 %d
  23. 1 belong&0xfff7ffff 0x00020000 Targa image data - RGB
  24. !:strength + 2
  25. >2 byte&8 8 - RLE
  26. >12 leshort >0 %d x
  27. >14 leshort >0 %d
  28. 1 belong&0xfff7ffff 0x00030000 Targa image data - Mono
  29. !:strength + 2
  30. >2 byte&8 8 - RLE
  31. >12 leshort >0 %d x
  32. >14 leshort >0 %d
  33. # PBMPLUS images
  34. # The next byte following the magic is always whitespace.
  35. # strength is changed to try these patterns before "x86 boot sector"
  36. 0 search/1 P1
  37. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PBM image text
  38. >3 regex =[0-9]{1,50}\ \b, size = %sx
  39. >>3 regex =\ [0-9]{1,50} \b%s
  40. !:strength + 45
  41. !:mime image/x-portable-bitmap
  42. 0 search/1 P2
  43. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PGM image text
  44. >3 regex =[0-9]{1,50}\ \b, size = %sx
  45. >>3 regex =\ [0-9]{1,50} \b%s
  46. !:strength + 45
  47. !:mime image/x-portable-greymap
  48. 0 search/1 P3
  49. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PPM image text
  50. >3 regex =[0-9]{1,50}\ \b, size = %sx
  51. >>3 regex =\ [0-9]{1,50} \b%s
  52. !:strength + 45
  53. !:mime image/x-portable-pixmap
  54. 0 string P4
  55. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PBM "rawbits" image data
  56. >3 regex =[0-9]{1,50}\ \b, size = %sx
  57. >>3 regex =\ [0-9]{1,50} \b%s
  58. !:strength + 45
  59. !:mime image/x-portable-bitmap
  60. 0 string P5
  61. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PGM "rawbits" image data
  62. >3 regex =[0-9]{1,50}\ \b, size = %sx
  63. >>3 regex =\ [0-9]{1,50} \b%s
  64. !:strength + 45
  65. !:mime image/x-portable-greymap
  66. 0 string P6
  67. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PPM "rawbits" image data
  68. >3 regex =[0-9]{1,50}\ \b, size = %sx
  69. >>3 regex =\ [0-9]{1,50} \b%s
  70. !:strength + 45
  71. !:mime image/x-portable-pixmap
  72. 0 string P7 Netpbm PAM image file
  73. !:mime image/x-portable-pixmap
  74. # From: bryanh@giraffe-data.com (Bryan Henderson)
  75. 0 string \117\072 Solitaire Image Recorder format
  76. >4 string \013 MGI Type 11
  77. >4 string \021 MGI Type 17
  78. 0 string .MDA MicroDesign data
  79. >21 byte 48 version 2
  80. >21 byte 51 version 3
  81. 0 string .MDP MicroDesign page data
  82. >21 byte 48 version 2
  83. >21 byte 51 version 3
  84. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  85. # [GRR: this *must* go before TIFF]
  86. 0 string IIN1 NIFF image data
  87. !:mime image/x-niff
  88. # Canon RAW version 1 (CRW) files are a type of Canon Image File Format
  89. # (CIFF) file. These are apparently all little-endian.
  90. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  91. # URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
  92. 0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data
  93. !:mime image/x-canon-crw
  94. >16 leshort x \b, version %d.
  95. >14 leshort x \b%d
  96. # Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
  97. # number. Put this above the TIFF test to make sure we detect them.
  98. # These are apparently all little-endian.
  99. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  100. # URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2
  101. 0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data
  102. !:mime image/x-canon-cr2
  103. >10 byte x \b, version %d.
  104. >11 byte x \b%d
  105. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  106. # The second word of TIFF files is the TIFF version number, 42, which has
  107. # never changed. The TIFF specification recommends testing for it.
  108. 0 string MM\x00\x2a TIFF image data, big-endian
  109. !:mime image/tiff
  110. >(4.L) use tiff_ifd
  111. 0 string II\x2a\x00 TIFF image data, little-endian
  112. !:mime image/tiff
  113. >(4.l) use tiff_ifd
  114. 0 name tiff_ifd
  115. >0 leshort x \b, direntries=%d
  116. >2 use tiff_entry
  117. 0 name tiff_entry
  118. >0 leshort 0x100
  119. >>4 lelong 1
  120. >>>12 use tiff_entry
  121. >>>8 lelong x \b, width=%d
  122. >0 leshort 0x101
  123. >>4 lelong 1
  124. >>>8 lelong x \b, height=%d
  125. >>>12 use tiff_entry
  126. >0 leshort 0x102
  127. >>8 lelong x \b, bps=%d
  128. >>12 use tiff_entry
  129. >0 leshort 0x103
  130. >>4 lelong 1 \b, compression=
  131. >>>8 lelong 1 \bnone
  132. >>>8 lelong 2 \bhuffman
  133. >>>8 lelong 3 \bbi-level group 3
  134. >>>8 lelong 4 \bbi-level group 4
  135. >>>8 lelong 5 \bLZW
  136. >>>8 lelong 6 \bJPEG (old)
  137. >>>8 lelong 7 \bJPEG
  138. >>>8 lelong 8 \bdeflate
  139. >>>8 lelong 9 \bJBIG, ITU-T T.85
  140. >>>8 lelong 0xa \bJBIG, ITU-T T.43
  141. >>>8 lelong 0x7ffe \bNeXT RLE 2-bit
  142. >>>8 lelong 0x8005 \bPackBits (Macintosh RLE)
  143. >>>8 lelong 0x8029 \bThunderscan RLE
  144. >>>8 lelong 0x807f \bRasterPadding (CT or MP)
  145. >>>8 lelong 0x8080 \bRLE (Line Work)
  146. >>>8 lelong 0x8081 \bRLE (High-Res Cont-Tone)
  147. >>>8 lelong 0x8082 \bRLE (Binary Line Work)
  148. >>>8 lelong 0x80b2 \bDeflate (PKZIP)
  149. >>>8 lelong 0x80b3 \bKodak DCS
  150. >>>8 lelong 0x8765 \bJBIG
  151. >>>8 lelong 0x8798 \bJPEG2000
  152. >>>8 lelong 0x8799 \bNikon NEF Compressed
  153. >>>8 default x
  154. >>>>8 lelong x \b(unknown 0x%x)
  155. >>>12 use tiff_entry
  156. >0 leshort 0x106 \b, PhotometricIntepretation=
  157. >>8 lelong 0 \bWhiteIsZero
  158. >>8 lelong 1 \bBlackIsZero
  159. >>8 lelong 2 \bRGB
  160. >>8 lelong 3 \bRGB Palette
  161. >>8 lelong 4 \bTransparency Mask
  162. >>8 lelong 5 \bCMYK
  163. >>8 lelong 6 \bYCbCr
  164. >>8 lelong 8 \bCIELab
  165. >>>8 lelong x \b(unknown=0x%x)
  166. >>12 use tiff_entry
  167. # FillOrder
  168. >0 leshort 0x10a
  169. >>4 lelong 1
  170. >>>12 use tiff_entry
  171. # DocumentName
  172. >0 leshort 0x10d
  173. >>(8.l) string x \b, name=%s
  174. >>>12 use tiff_entry
  175. # ImageDescription
  176. >0 leshort 0x10e
  177. >>(8.l) string x \b, description=%s
  178. >>>12 use tiff_entry
  179. # StripOffsets
  180. >0 leshort 0x111
  181. >>12 use tiff_entry
  182. # NewSubFileType
  183. >0 leshort 0xfe
  184. >>12 use tiff_entry
  185. # Datetime
  186. >0 leshort 0x132
  187. >>(8.l) string x \b, datetime=%s
  188. >>>12 use tiff_entry
  189. # HostComputer
  190. >0 leshort 0x13c
  191. >>(8.l) string x \b, hostcomputer=%s
  192. >>>12 use tiff_entry
  193. #>0 leshort x \b, unknown=0x%x
  194. 0 string MM\x00\x2b Big TIFF image data, big-endian
  195. !:mime image/tiff
  196. 0 string II\x2b\x00 Big TIFF image data, little-endian
  197. !:mime image/tiff
  198. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  199. # (Greg Roelofs, newt@uchicago.edu)
  200. # (Albert Cahalan, acahalan@cs.uml.edu)
  201. #
  202. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  203. #
  204. 0 string \x89PNG\x0d\x0a\x1a\x0a PNG image data
  205. !:mime image/png
  206. >16 belong x \b, %d x
  207. >20 belong x %d,
  208. >24 byte x %d-bit
  209. >25 byte 0 grayscale,
  210. >25 byte 2 \b/color RGB,
  211. >25 byte 3 colormap,
  212. >25 byte 4 gray+alpha,
  213. >25 byte 6 \b/color RGBA,
  214. #>26 byte 0 deflate/32K,
  215. >28 byte 0 non-interlaced
  216. >28 byte 1 interlaced
  217. # possible GIF replacements; none yet released!
  218. # (Greg Roelofs, newt@uchicago.edu)
  219. #
  220. # GRR 950115: this was mine ("Zip GIF"):
  221. 0 string GIF94z ZIF image (GIF+deflate alpha)
  222. !:mime image/x-unknown
  223. #
  224. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  225. #
  226. 0 string FGF95a FGF image (GIF+deflate beta)
  227. !:mime image/x-unknown
  228. #
  229. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  230. # (best; not yet implemented):
  231. #
  232. 0 string PBF PBF image (deflate compression)
  233. !:mime image/x-unknown
  234. # GIF
  235. 0 string GIF8 GIF image data
  236. !:mime image/gif
  237. !:apple 8BIMGIFf
  238. >4 string 7a \b, version 8%s,
  239. >4 string 9a \b, version 8%s,
  240. >6 leshort >0 %d x
  241. >8 leshort >0 %d
  242. #>10 byte &0x80 color mapped,
  243. #>10 byte&0x07 =0x00 2 colors
  244. #>10 byte&0x07 =0x01 4 colors
  245. #>10 byte&0x07 =0x02 8 colors
  246. #>10 byte&0x07 =0x03 16 colors
  247. #>10 byte&0x07 =0x04 32 colors
  248. #>10 byte&0x07 =0x05 64 colors
  249. #>10 byte&0x07 =0x06 128 colors
  250. #>10 byte&0x07 =0x07 256 colors
  251. # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster,
  252. # 1 plane, no encoding.
  253. 0 string \361\0\100\273 CMU window manager raster image data
  254. >4 lelong >0 %d x
  255. >8 lelong >0 %d,
  256. >12 lelong >0 %d-bit
  257. # Magick Image File Format
  258. 0 string id=ImageMagick MIFF image data
  259. # Artisan
  260. 0 long 1123028772 Artisan image data
  261. >4 long 1 \b, rectangular 24-bit
  262. >4 long 2 \b, rectangular 8-bit with colormap
  263. >4 long 3 \b, rectangular 32-bit (24-bit with matte)
  264. # FIG (Facility for Interactive Generation of figures), an object-based format
  265. 0 search/1 #FIG FIG image text
  266. >5 string x \b, version %.3s
  267. # PHIGS
  268. 0 string ARF_BEGARF PHIGS clear text archive
  269. 0 string @(#)SunPHIGS SunPHIGS
  270. # version number follows, in the form m.n
  271. >40 string SunBin binary
  272. >32 string archive archive
  273. # GKS (Graphics Kernel System)
  274. 0 string GKSM GKS Metafile
  275. >24 string SunGKS \b, SunGKS
  276. # CGM image files
  277. 0 string BEGMF clear text Computer Graphics Metafile
  278. # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  279. 0 string yz MGR bitmap, modern format, 8-bit aligned
  280. 0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned
  281. 0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned
  282. 0 string yx MGR bitmap, modern format, squeezed
  283. # Fuzzy Bitmap (FBM) images
  284. 0 string %bitmap\0 FBM image data
  285. >30 long 0x31 \b, mono
  286. >30 long 0x33 \b, color
  287. # facsimile data
  288. 1 string PC\ Research,\ Inc group 3 fax data
  289. >29 byte 0 \b, normal resolution (204x98 DPI)
  290. >29 byte 1 \b, fine resolution (204x196 DPI)
  291. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  292. 0 string Sfff structured fax file
  293. # From: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
  294. # most files with the extension .EPA and some with .BMP
  295. 0 string \x11\x06 Award BIOS Logo, 136 x 84
  296. !:mime image/x-award-bioslogo
  297. 0 string \x11\x09 Award BIOS Logo, 136 x 126
  298. !:mime image/x-award-bioslogo
  299. #0 string \x07\x1f BIOS Logo corrupted?
  300. # http://www.blackfiveservices.co.uk/awbmtools.shtml
  301. # http://biosgfx.narod.ru/v3/
  302. # http://biosgfx.narod.ru/abr-2/
  303. 0 string AWBM
  304. >4 leshort <1981 Award BIOS bitmap
  305. !:mime image/x-award-bmp
  306. # image width is a multiple of 4
  307. >>4 leshort&0x0003 0
  308. >>>4 leshort x \b, %d
  309. >>>6 leshort x x %d
  310. >>4 leshort&0x0003 >0 \b,
  311. >>>4 leshort&0x0003 =1
  312. >>>>4 leshort x %d+3
  313. >>>4 leshort&0x0003 =2
  314. >>>>4 leshort x %d+2
  315. >>>4 leshort&0x0003 =3
  316. >>>>4 leshort x %d+1
  317. >>>6 leshort x x %d
  318. # at offset 8 starts imagedata followed by "RGB " marker
  319. # PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu)
  320. # http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\
  321. # 28bitmap_information_header.29
  322. 0 string BM
  323. >14 leshort 12 PC bitmap, OS/2 1.x format
  324. !:mime image/x-ms-bmp
  325. >>18 leshort x \b, %d x
  326. >>20 leshort x %d
  327. >14 leshort 64 PC bitmap, OS/2 2.x format
  328. !:mime image/x-ms-bmp
  329. >>18 leshort x \b, %d x
  330. >>20 leshort x %d
  331. >14 leshort 40 PC bitmap, Windows 3.x format
  332. !:mime image/x-ms-bmp
  333. >>18 lelong x \b, %d x
  334. >>22 lelong x %d x
  335. >>28 leshort x %d
  336. >14 leshort 124 PC bitmap, Windows 98/2000 and newer format
  337. !:mime image/x-ms-bmp
  338. >>18 lelong x \b, %d x
  339. >>22 lelong x %d x
  340. >>28 leshort x %d
  341. >14 leshort 108 PC bitmap, Windows 95/NT4 and newer format
  342. !:mime image/x-ms-bmp
  343. >>18 lelong x \b, %d x
  344. >>22 lelong x %d x
  345. >>28 leshort x %d
  346. >14 leshort 128 PC bitmap, Windows NT/2000 format
  347. !:mime image/x-ms-bmp
  348. >>18 lelong x \b, %d x
  349. >>22 lelong x %d x
  350. >>28 leshort x %d
  351. # Too simple - MPi
  352. #0 string IC PC icon data
  353. #0 string PI PC pointer image data
  354. #0 string CI PC color icon data
  355. #0 string CP PC color pointer image data
  356. # Conflicts with other entries [BABYL]
  357. #0 string BA PC bitmap array data
  358. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  359. 0 search/1 /*\ XPM\ */ X pixmap image text
  360. !:mime image/x-xpmi
  361. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  362. 0 leshort 0xcc52 RLE image data,
  363. >6 leshort x %d x
  364. >8 leshort x %d
  365. >2 leshort >0 \b, lower left corner: %d
  366. >4 leshort >0 \b, lower right corner: %d
  367. >10 byte&0x1 =0x1 \b, clear first
  368. >10 byte&0x2 =0x2 \b, no background
  369. >10 byte&0x4 =0x4 \b, alpha channel
  370. >10 byte&0x8 =0x8 \b, comment
  371. >11 byte >0 \b, %d color channels
  372. >12 byte >0 \b, %d bits per pixel
  373. >13 byte >0 \b, %d color map channels
  374. # image file format (Robert Potter, potter@cs.rochester.edu)
  375. 0 string Imagefile\ version- iff image data
  376. # this adds the whole header (inc. version number), informative but longish
  377. >10 string >\0 %s
  378. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  379. 0 belong 0x59a66a95 Sun raster image data
  380. >4 belong >0 \b, %d x
  381. >8 belong >0 %d,
  382. >12 belong >0 %d-bit,
  383. #>16 belong >0 %d bytes long,
  384. >20 belong 0 old format,
  385. #>20 belong 1 standard,
  386. >20 belong 2 compressed,
  387. >20 belong 3 RGB,
  388. >20 belong 4 TIFF,
  389. >20 belong 5 IFF,
  390. >20 belong 0xffff reserved for testing,
  391. >24 belong 0 no colormap
  392. >24 belong 1 RGB colormap
  393. >24 belong 2 raw colormap
  394. #>28 belong >0 colormap is %d bytes long
  395. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  396. #
  397. # See
  398. # http://reality.sgi.com/grafica/sgiimage.html
  399. #
  400. 0 beshort 474 SGI image data
  401. #>2 byte 0 \b, verbatim
  402. >2 byte 1 \b, RLE
  403. #>3 byte 1 \b, normal precision
  404. >3 byte 2 \b, high precision
  405. >4 beshort x \b, %d-D
  406. >6 beshort x \b, %d x
  407. >8 beshort x %d
  408. >10 beshort x \b, %d channel
  409. >10 beshort !1 \bs
  410. >80 string >0 \b, "%s"
  411. 0 string IT01 FIT image data
  412. >4 belong x \b, %d x
  413. >8 belong x %d x
  414. >12 belong x %d
  415. #
  416. 0 string IT02 FIT image data
  417. >4 belong x \b, %d x
  418. >8 belong x %d x
  419. >12 belong x %d
  420. #
  421. 2048 string PCD_IPI Kodak Photo CD image pack file
  422. >0xe02 byte&0x03 0x00 , landscape mode
  423. >0xe02 byte&0x03 0x01 , portrait mode
  424. >0xe02 byte&0x03 0x02 , landscape mode
  425. >0xe02 byte&0x03 0x03 , portrait mode
  426. 0 string PCD_OPA Kodak Photo CD overview pack file
  427. # FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  428. # FITS is the Flexible Image Transport System, the de facto standard for
  429. # data and image transfer, storage, etc., for the astronomical community.
  430. # (FITS floating point formats are big-endian.)
  431. 0 string SIMPLE\ \ = FITS image data
  432. >109 string 8 \b, 8-bit, character or unsigned binary integer
  433. >108 string 16 \b, 16-bit, two's complement binary integer
  434. >107 string \ 32 \b, 32-bit, two's complement binary integer
  435. >107 string -32 \b, 32-bit, floating point, single precision
  436. >107 string -64 \b, 64-bit, floating point, double precision
  437. # other images
  438. 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file
  439. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  440. # stuff.
  441. #
  442. 0 beshort 0x1010 PEX Binary Archive
  443. # DICOM medical imaging data
  444. 128 string DICM DICOM medical imaging data
  445. !:mime application/dicom
  446. # XWD - X Window Dump file.
  447. # As described in /usr/X11R6/include/X11/XWDFile.h
  448. # used by the xwd program.
  449. # Bradford Castalia, idaeim, 1/01
  450. # updated by Adam Buchbinder, 2/09
  451. # The following assumes version 7 of the format; the first long is the length
  452. # of the header, which is at least 25 4-byte longs, and the one at offset 8
  453. # is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
  454. # which is a maximum of 32.
  455. 0 belong >100
  456. >8 belong <3
  457. >>12 belong <33
  458. >>>4 belong 7 XWD X Window Dump image data
  459. !:mime image/x-xwindowdump
  460. >>>>100 string >\0 \b, "%s"
  461. >>>>16 belong x \b, %dx
  462. >>>>20 belong x \b%dx
  463. >>>>12 belong x \b%d
  464. # PDS - Planetary Data System
  465. # These files use Parameter Value Language in the header section.
  466. # Unfortunately, there is no certain magic, but the following
  467. # strings have been found to be most likely.
  468. 0 string NJPL1I00 PDS (JPL) image data
  469. 2 string NJPL1I PDS (JPL) image data
  470. 0 string CCSD3ZF PDS (CCSD) image data
  471. 2 string CCSD3Z PDS (CCSD) image data
  472. 0 string PDS_ PDS image data
  473. 0 string LBLSIZE= PDS (VICAR) image data
  474. # pM8x: ATARI STAD compressed bitmap format
  475. #
  476. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  477. # p M 8 5/6 xx yy zz data...
  478. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  479. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  480. # most frequent byte, xx and zz are runlength escape codes, where xx is
  481. # used for runs of yy.
  482. #
  483. 0 string pM85 Atari ST STAD bitmap image data (hor)
  484. >5 byte 0x00 (white background)
  485. >5 byte 0xFF (black background)
  486. 0 string pM86 Atari ST STAD bitmap image data (vert)
  487. >5 byte 0x00 (white background)
  488. >5 byte 0xFF (black background)
  489. # Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  490. # http://www.atarimax.com/jindroush.atari.org/afmtatr.html
  491. 0 leshort 0x0296 Atari ATR image
  492. # XXX:
  493. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  494. # magic.
  495. # SGI RICE image file <mpruett@sgi.com>
  496. #0 beshort 0x5249 RICE image
  497. #>2 beshort x v%d
  498. #>4 beshort x (%d x
  499. #>6 beshort x %d)
  500. #>8 beshort 0 8 bit
  501. #>8 beshort 1 10 bit
  502. #>8 beshort 2 12 bit
  503. #>8 beshort 3 13 bit
  504. #>10 beshort 0 4:2:2
  505. #>10 beshort 1 4:2:2:4
  506. #>10 beshort 2 4:4:4
  507. #>10 beshort 3 4:4:4:4
  508. #>12 beshort 1 RGB
  509. #>12 beshort 2 CCIR601
  510. #>12 beshort 3 RP175
  511. #>12 beshort 4 YUV
  512. # PCX image files
  513. # From: Dan Fandrich <dan@coneharvesters.com>
  514. # updated by Joerg Jenderek at Feb 2013 by http://de.wikipedia.org/wiki/PCX
  515. # http://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt
  516. # GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000
  517. # test for bytes 0x0a,version byte (0,2,3,4,5),compression byte flag(0,1), bit depth (>0) of PCX or T5.DBT,T6.DBT
  518. 0 ubelong&0xffF8fe00 0x0a000000
  519. # for PCX bit depth > 0
  520. >3 ubyte >0
  521. # test for valid versions
  522. >>1 ubyte <6
  523. >>>1 ubyte !1 PCX
  524. !:mime image/x-pcx
  525. #!:mime image/pcx
  526. >>>>1 ubyte 0 ver. 2.5 image data
  527. >>>>1 ubyte 2 ver. 2.8 image data, with palette
  528. >>>>1 ubyte 3 ver. 2.8 image data, without palette
  529. >>>>1 ubyte 4 for Windows image data
  530. >>>>1 ubyte 5 ver. 3.0 image data
  531. >>>>4 uleshort x bounding box [%d,
  532. >>>>6 uleshort x %d] -
  533. >>>>8 uleshort x [%d,
  534. >>>>10 uleshort x %d],
  535. >>>>65 ubyte >1 %d planes each of
  536. >>>>3 ubyte x %d-bit
  537. >>>>68 byte 1 colour,
  538. >>>>68 byte 2 grayscale,
  539. # this should not happen
  540. >>>>68 default x image,
  541. >>>>12 leshort >0 %d x
  542. >>>>>14 uleshort x %d dpi,
  543. >>>>2 byte 0 uncompressed
  544. >>>>2 byte 1 RLE compressed
  545. # Adobe Photoshop
  546. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  547. 0 string 8BPS Adobe Photoshop Image
  548. !:mime image/vnd.adobe.photoshop
  549. >4 beshort 2 (PSB)
  550. >18 belong x \b, %d x
  551. >14 belong x %d,
  552. >24 beshort 0 bitmap
  553. >24 beshort 1 grayscale
  554. >>12 beshort 2 with alpha
  555. >24 beshort 2 indexed
  556. >24 beshort 3 RGB
  557. >>12 beshort 4 \bA
  558. >24 beshort 4 CMYK
  559. >>12 beshort 5 \bA
  560. >24 beshort 7 multichannel
  561. >24 beshort 8 duotone
  562. >24 beshort 9 lab
  563. >12 beshort > 1
  564. >>12 beshort x \b, %dx
  565. >12 beshort 1 \b,
  566. >22 beshort x %d-bit channel
  567. >12 beshort > 1 \bs
  568. # XV thumbnail indicator (ThMO)
  569. 0 string P7\ 332 XV thumbnail image data
  570. # NITF is defined by United States MIL-STD-2500A
  571. 0 string NITF National Imagery Transmission Format
  572. >25 string >\0 dated %.14s
  573. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  574. 0 belong 0x00010008 GEM Image data
  575. >12 beshort x %d x
  576. >14 beshort x %d,
  577. >4 beshort x %d planes,
  578. >8 beshort x %d x
  579. >10 beshort x %d pixelsize
  580. # GEM Metafile (Wolfram Kleff)
  581. 0 lelong 0x0018FFFF GEM Metafile data
  582. >4 leshort x version %d
  583. #
  584. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  585. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  586. #
  587. 0 string \0\nSMJPEG SMJPEG
  588. >8 belong x %d.x data
  589. # According to the specification you could find any number of _TXT
  590. # headers here, but I can't think of any way of handling that. None of
  591. # the SMJPEG files I tried it on used this feature. Even if such a
  592. # file is encountered the output should still be reasonable.
  593. >16 string _SND \b,
  594. >>24 beshort >0 %d Hz
  595. >>26 byte 8 8-bit
  596. >>26 byte 16 16-bit
  597. >>28 string NONE uncompressed
  598. # >>28 string APCM ADPCM compressed
  599. >>27 byte 1 mono
  600. >>28 byte 2 stereo
  601. # Help! Isn't there any way to avoid writing this part twice?
  602. >>32 string _VID \b,
  603. # >>>48 string JFIF JPEG
  604. >>>40 belong >0 %d frames
  605. >>>44 beshort >0 (%d x
  606. >>>46 beshort >0 %d)
  607. >16 string _VID \b,
  608. # >>32 string JFIF JPEG
  609. >>24 belong >0 %d frames
  610. >>28 beshort >0 (%d x
  611. >>30 beshort >0 %d)
  612. 0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File
  613. # "thumbnail file" (icon)
  614. # descended from "xv", but in use by other applications as well (Wolfram Kleff)
  615. 0 string P7\ 332 XV "thumbnail file" (icon) data
  616. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  617. 0 string KiSS KISS/GS
  618. >4 byte 16 color
  619. >>5 byte x %d bit
  620. >>8 leshort x %d colors
  621. >>10 leshort x %d groups
  622. >4 byte 32 cell
  623. >>5 byte x %d bit
  624. >>8 leshort x %d x
  625. >>10 leshort x %d
  626. >>12 leshort x +%d
  627. >>14 leshort x +%d
  628. # Webshots (www.webshots.com), by John Harrison
  629. 0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  630. # Hercules DASD image files
  631. # From Jan Jaeger <jj@septa.nl>
  632. 0 string CKD_P370 Hercules CKD DASD image file
  633. >8 long x \b, %d heads per cylinder
  634. >12 long x \b, track size %d bytes
  635. >16 byte x \b, device type 33%2.2X
  636. 0 string CKD_C370 Hercules compressed CKD DASD image file
  637. >8 long x \b, %d heads per cylinder
  638. >12 long x \b, track size %d bytes
  639. >16 byte x \b, device type 33%2.2X
  640. 0 string CKD_S370 Hercules CKD DASD shadow file
  641. >8 long x \b, %d heads per cylinder
  642. >12 long x \b, track size %d bytes
  643. >16 byte x \b, device type 33%2.2X
  644. # Squeak images and programs - etoffi@softhome.net
  645. 0 string \146\031\0\0 Squeak image data
  646. 0 search/1 'From\040Squeak Squeak program text
  647. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  648. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  649. 0 string PaRtImAgE-VoLuMe PartImage
  650. >0x0020 string 0.6.1 file version %s
  651. >>0x0060 lelong >-1 volume %d
  652. #>>0x0064 8 byte identifier
  653. #>>0x007c reserved
  654. >>0x0200 string >\0 type %s
  655. >>0x1400 string >\0 device %s,
  656. >>0x1600 string >\0 original filename %s,
  657. # Some fields omitted
  658. >>0x2744 lelong 0 not compressed
  659. >>0x2744 lelong 1 gzip compressed
  660. >>0x2744 lelong 2 bzip2 compressed
  661. >>0x2744 lelong >2 compressed with unknown algorithm
  662. >0x0020 string >0.6.1 file version %s
  663. >0x0020 string <0.6.1 file version %s
  664. # DCX is multi-page PCX, using a simple header of up to 1024
  665. # offsets for the respective PCX components.
  666. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  667. 0 lelong 987654321 DCX multi-page PCX image data
  668. # Simon Walton <simonw@matteworld.com>
  669. # Kodak Cineon format for scanned negatives
  670. # http://www.kodak.com/US/en/motion/support/dlad/
  671. 0 lelong 0xd75f2a80 Cineon image data
  672. >200 belong >0 \b, %d x
  673. >204 belong >0 %d
  674. # Bio-Rad .PIC is an image format used by microscope control systems
  675. # and related image processing software used by biologists.
  676. # From: Vebjorn Ljosa <vebjorn@ljosa.com>
  677. # BOOL values are two-byte integers; use them to rule out false positives.
  678. # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
  679. # Samples: http://www.loci.wisc.edu/software/sample-data
  680. 14 leshort <2
  681. >62 leshort <2
  682. >>54 leshort 12345 Bio-Rad .PIC Image File
  683. >>>0 leshort >0 %d x
  684. >>>2 leshort >0 %d,
  685. >>>4 leshort =1 1 image in file
  686. >>>4 leshort >1 %d images in file
  687. # From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  688. # The description of *.mrw format can be found at
  689. # http://www.dalibor.cz/minolta/raw_file_format.htm
  690. 0 string \000MRM Minolta Dimage camera raw image data
  691. # Summary: DjVu image / document
  692. # Extension: .djvu
  693. # Reference: http://djvu.org/docs/DjVu3Spec.djvu
  694. # Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
  695. # Modified by (1): Abel Cheung <abelcheung@gmail.com>
  696. 0 string AT&TFORM
  697. >12 string DJVM DjVu multiple page document
  698. !:mime image/vnd.djvu
  699. >12 string DJVU DjVu image or single page document
  700. !:mime image/vnd.djvu
  701. >12 string DJVI DjVu shared document
  702. !:mime image/vnd.djvu
  703. >12 string THUM DjVu page thumbnails
  704. !:mime image/vnd.djvu
  705. # Originally by Marc Espie
  706. # Modified by Robert Minsk <robertminsk at yahoo.com>
  707. # http://www.openexr.com/openexrfilelayout.pdf
  708. 0 lelong 20000630 OpenEXR image data,
  709. !:mime image/x-exr
  710. >4 lelong&0x000000ff x version %d,
  711. >4 lelong ^0x00000200 storage: scanline
  712. >4 lelong &0x00000200 storage: tiled
  713. >8 search/0x1000 compression\0 \b, compression:
  714. >>&16 byte 0 none
  715. >>&16 byte 1 rle
  716. >>&16 byte 2 zips
  717. >>&16 byte 3 zip
  718. >>&16 byte 4 piz
  719. >>&16 byte 5 pxr24
  720. >>&16 byte 6 b44
  721. >>&16 byte 7 b44a
  722. >>&16 byte >7 unknown
  723. >8 search/0x1000 dataWindow\0 \b, dataWindow:
  724. >>&10 lelong x (%d
  725. >>&14 lelong x %d)-
  726. >>&18 lelong x \b(%d
  727. >>&22 lelong x %d)
  728. >8 search/0x1000 displayWindow\0 \b, displayWindow:
  729. >>&10 lelong x (%d
  730. >>&14 lelong x %d)-
  731. >>&18 lelong x \b(%d
  732. >>&22 lelong x %d)
  733. >8 search/0x1000 lineOrder\0 \b, lineOrder:
  734. >>&14 byte 0 increasing y
  735. >>&14 byte 1 decreasing y
  736. >>&14 byte 2 random y
  737. >>&14 byte >2 unknown
  738. # SMPTE Digital Picture Exchange Format, SMPTE DPX
  739. #
  740. # ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
  741. # Moving-Picture Exchange (DPX), v1.0, 18 February 1994
  742. # Robert Minsk <robertminsk at yahoo.com>
  743. 0 string SDPX DPX image data, big-endian,
  744. !:mime image/x-dpx
  745. >768 beshort <4
  746. >>772 belong x %dx
  747. >>776 belong x \b%d,
  748. >768 beshort >3
  749. >>776 belong x %dx
  750. >>772 belong x \b%d,
  751. >768 beshort 0 left to right/top to bottom
  752. >768 beshort 1 right to left/top to bottom
  753. >768 beshort 2 left to right/bottom to top
  754. >768 beshort 3 right to left/bottom to top
  755. >768 beshort 4 top to bottom/left to right
  756. >768 beshort 5 top to bottom/right to left
  757. >768 leshort 6 bottom to top/left to right
  758. >768 leshort 7 bottom to top/right to left
  759. # From: Tom Hilinski <tom.hilinski@comcast.net>
  760. # http://www.unidata.ucar.edu/packages/netcdf/
  761. 0 string CDF\001 NetCDF Data Format data
  762. #-----------------------------------------------------------------------
  763. # Hierarchical Data Format, used to facilitate scientific data exchange
  764. # specifications at http://hdf.ncsa.uiuc.edu/
  765. 0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  766. !:mime application/x-hdf
  767. 0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data
  768. !:mime application/x-hdf
  769. 512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block
  770. !:mime application/x-hdf
  771. 1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block
  772. !:mime application/x-hdf
  773. 2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block
  774. !:mime application/x-hdf
  775. 4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block
  776. !:mime application/x-hdf
  777. # From: Tobias Burnus <burnus@net-b.de>
  778. # Xara (for a while: Corel Xara) is a graphic package, see
  779. # http://www.xara.com/ for Windows and as GPL application for Linux
  780. 0 string XARA\243\243 Xara graphics file
  781. # http://www.cartesianinc.com/Tech/
  782. 0 string CPC\262 Cartesian Perceptual Compression image
  783. !:mime image/x-cpi
  784. # From Albert Cahalan <acahalan@gmail.com>
  785. # puredigital used it for the CVS disposable camcorder
  786. #8 lelong 4 ZBM bitmap image data
  787. #>4 leshort x %u x
  788. #>6 leshort x %u
  789. # From Albert Cahalan <acahalan@gmail.com>
  790. # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
  791. 0 string C565 OLPC firmware icon image data
  792. >4 leshort x %u x
  793. >6 leshort x %u
  794. # Applied Images - Image files from Cytovision
  795. # Gustavo Junior Alves <gjalves@gjalves.com.br>
  796. 0 string \xce\xda\xde\xfa Cytovision Metaphases file
  797. 0 string \xed\xad\xef\xac Cytovision Karyotype file
  798. 0 string \x0b\x00\x03\x00 Cytovision FISH Probe file
  799. 0 string \xed\xfe\xda\xbe Cytovision FLEX file
  800. 0 string \xed\xab\xed\xfe Cytovision FLEX file
  801. 0 string \xad\xfd\xea\xad Cytovision RATS file
  802. # Wavelet Scalar Quantization format used in gray-scale fingerprint images
  803. # From Tano M Fotang <mfotang@quanteq.com>
  804. 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data
  805. # Type: PCO B16 image files
  806. # URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf
  807. # From: Florian Philipp <florian.philipp@binarywings.net>
  808. # Extension: .b16
  809. # Description: Pixel image format produced by PCO Camware, typically used
  810. # together with PCO cameras.
  811. # Note: Different versions exist for e.g. 8 bit and 16 bit images.
  812. # Documentation is incomplete.
  813. 0 string/b PCO- PCO B16 image data
  814. >12 lelong x \b, %dx
  815. >16 lelong x \b%d
  816. >20 lelong 0 \b, short header
  817. >20 lelong -1 \b, extended header
  818. >>24 lelong 0 \b, grayscale
  819. >>>36 lelong 0 linear LUT
  820. >>>36 lelong 1 logarithmic LUT
  821. >>>28 lelong x [%d
  822. >>>32 lelong x \b,%d]
  823. >>24 lelong 1 \b, color
  824. >>>64 lelong 0 linear LUT
  825. >>>64 lelong 1 logarithmic LUT
  826. >>>40 lelong x r[%d
  827. >>>44 lelong x \b,%d]
  828. >>>48 lelong x g[%d
  829. >>>52 lelong x \b,%d]
  830. >>>56 lelong x b[%d
  831. >>>60 lelong x \b,%d]
  832. # Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches
  833. # From: Markus Heidelberg <markus.heidelberg at web.de>
  834. 0 string/t [BitmapInfo2] Polar Monitor Bitmap text
  835. !:mime image/x-polar-monitor-bitmap
  836. # From: Rick Richardson <rickrich@gmail.com>
  837. 0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file
  838. # Type: Ulead Photo Explorer5 (.pe5)
  839. # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
  840. # From: Simon Horman <horms@debian.org>
  841. 0 string IIO2H Ulead Photo Explorer5
  842. # Type: X11 cursor
  843. # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
  844. # From: Mathias Brodala <info@noctus.net>
  845. 0 string Xcur X11 cursor
  846. # Type: Olympus ORF raw images.
  847. # URL: http://libopenraw.freedesktop.org/wiki/Olympus_ORF
  848. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  849. 0 string MMOR Olympus ORF raw image data, big-endian
  850. !:mime image/x-olympus-orf
  851. 0 string IIRO Olympus ORF raw image data, little-endian
  852. !:mime image/x-olympus-orf
  853. 0 string IIRS Olympus ORF raw image data, little-endian
  854. !:mime image/x-olympus-orf
  855. # Type: files used in modern AVCHD camcoders to store clip information
  856. # Extension: .cpi
  857. # From: Alexander Danilov <alexander.a.danilov@gmail.com>
  858. 0 string HDMV0100 AVCHD Clip Information
  859. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  860. # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
  861. # Radiance HDR; usually has .pic or .hdr extension.
  862. 0 string #?RADIANCE\n Radiance HDR image data
  863. #!mime image/vnd.radiance
  864. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  865. # URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
  866. # Used by the pfstools packages. The regex matches for the image size could
  867. # probably use some work. The MIME type is made up; if there's one in
  868. # actual common use, it should replace the one below.
  869. 0 string PFS1\x0a PFS HDR image data
  870. #!mime image/x-pfs
  871. >1 regex [0-9]*\ \b, %s
  872. >>1 regex \ [0-9]{4} \bx%s
  873. # Type: Foveon X3F
  874. # URL: http://www.photofo.com/downloads/x3f-raw-format.pdf
  875. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  876. # Note that the MIME type isn't defined anywhere that I can find; if
  877. # there's a canonical type for this format, it should replace this one.
  878. 0 string FOVb Foveon X3F raw image data
  879. !:mime image/x-x3f
  880. >6 leshort x \b, version %d.
  881. >4 leshort x \b%d
  882. >28 lelong x \b, %dx
  883. >32 lelong x \b%d
  884. # Paint.NET file
  885. # From Adam Buchbinder <adam.buchbinder@gmail.com>
  886. 0 string PDN3 Paint.NET image data
  887. !:mime image/x-paintnet
  888. # Not really an image.
  889. # From: "Tano M. Fotang" <mfotang@quanteq.com>
  890. 0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR)
  891. # WEBP https://developers.google.com/speed/webp/docs/riff_container
  892. #0 string RIFF
  893. #>8 string WEBP Web/P image data
  894. #>>4 lelong x \b, %d bytes
  895. # doc: http://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip
  896. # example: http://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip
  897. 90 bequad 0x574D50484F544F00 JPEG-XR Image
  898. >98 byte&0x08 =0x08 \b, hard tiling
  899. >99 byte&0x80 =0x80 \b, tiling present
  900. >99 byte&0x40 =0x40 \b, codestream present
  901. >99 byte&0x38 x \b, spatial xform=
  902. >99 byte&0x38 0x00 \bTL
  903. >99 byte&0x38 0x08 \bBL
  904. >99 byte&0x38 0x10 \bTR
  905. >99 byte&0x38 0x18 \bBR
  906. >99 byte&0x38 0x20 \bBT
  907. >99 byte&0x38 0x28 \bRB
  908. >99 byte&0x38 0x30 \bLT
  909. >99 byte&0x38 0x38 \bLB
  910. >100 byte&0x80 =0x80 \b, short header
  911. >>102 beshort+1 x \b, %d
  912. >>104 beshort+1 x \bx%d
  913. >100 byte&0x80 =0x00 \b, long header
  914. >>102 belong+1 x \b, %x
  915. >>106 belong+1 x \bx%x
  916. >101 beshort&0xf x \b, bitdepth=
  917. >>101 beshort&0xf 0x0 \b1-WHITE=1
  918. >>101 beshort&0xf 0x1 \b8
  919. >>101 beshort&0xf 0x2 \b16
  920. >>101 beshort&0xf 0x3 \b16-SIGNED
  921. >>101 beshort&0xf 0x4 \b16-FLOAT
  922. >>101 beshort&0xf 0x5 \b(reserved 5)
  923. >>101 beshort&0xf 0x6 \b32-SIGNED
  924. >>101 beshort&0xf 0x7 \b32-FLOAT
  925. >>101 beshort&0xf 0x8 \b5
  926. >>101 beshort&0xf 0x9 \b10
  927. >>101 beshort&0xf 0xa \b5-6-5
  928. >>101 beshort&0xf 0xb \b(reserved %d)
  929. >>101 beshort&0xf 0xc \b(reserved %d)
  930. >>101 beshort&0xf 0xd \b(reserved %d)
  931. >>101 beshort&0xf 0xe \b(reserved %d)
  932. >>101 beshort&0xf 0xf \b1-BLACK=1
  933. >101 beshort&0xf0 x \b, colorfmt=
  934. >>101 beshort&0xf0 0x00 \bYONLY
  935. >>101 beshort&0xf0 0x10 \bYUV240
  936. >>101 beshort&0xf0 0x20 \bYWV422
  937. >>101 beshort&0xf0 0x30 \bYWV444
  938. >>101 beshort&0xf0 0x40 \bCMYK
  939. >>101 beshort&0xf0 0x50 \bCMYKDIRECT
  940. >>101 beshort&0xf0 0x60 \bNCOMPONENT
  941. >>101 beshort&0xf0 0x70 \bRGB
  942. >>101 beshort&0xf0 0x80 \bRGBE
  943. >>101 beshort&0xf0 >0x80 \b(reserved 0x%x)