images 35 KB

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