images 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569
  1. #------------------------------------------------------------------------------
  2. # $File: images,v 1.181 2020/05/30 23:49:03 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. # URL: http://justsolve.archiveteam.org/wiki/TGA
  14. # Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf
  15. # Update: Joerg Jenderek
  16. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  17. # ,32 or 33 (both not observed)
  18. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  19. # or theoretically 2-128 reserved for use by Truevision or 128-255 may be used for developer applications
  20. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  21. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  22. # `tgatoppm' recognizes a superset (Index may be anything)
  23. #
  24. # test of Color Map Type 0~no 1~color map
  25. # and Image Type 1 2 3 9 10 11 32 33
  26. # and Color Map Entry Size 0 15 16 24 32
  27. 0 ubequad&0x00FeC400000000C0 0
  28. # Conflict with MPEG sequences.
  29. !:strength -40
  30. # Prevent conflicts with CRI ADX.
  31. >(2.S-2) belong !0x28632943
  32. # skip more garbage like *.iso by looking for positive image type
  33. >>2 ubyte >0
  34. # skip some compiled terminfo like xterm+tmux by looking for image type less equal 33
  35. >>>2 ubyte <34
  36. # skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel depth 1 8 15 16 24 32
  37. >>>>16 ubyte 1
  38. >>>>>0 use tga-image
  39. >>>>16 ubyte 8
  40. >>>>>0 use tga-image
  41. >>>>16 ubyte 15
  42. >>>>>0 use tga-image
  43. >>>>16 ubyte 16
  44. >>>>>0 use tga-image
  45. >>>>16 ubyte 24
  46. >>>>>0 use tga-image
  47. >>>>16 ubyte 32
  48. >>>>>0 use tga-image
  49. # display tga bitmap image information
  50. 0 name tga-image
  51. >2 ubyte <34 Targa image data
  52. !:mime image/x-tga
  53. !:apple ????TPIC
  54. # normal extension .tga but some Truevision products used others:
  55. # tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that)
  56. !:ext tga/tpic/icb/vda/vst
  57. # image type 1 2 3 9 10 11 32 33
  58. >2 ubyte&0xF7 1 - Map
  59. >2 ubyte&0xF7 2 - RGB
  60. # alpha channel
  61. >>17 ubyte&0x0F >0 \bA
  62. >2 ubyte&0xF7 3 - Mono
  63. # type not found, but by http://www.fileformat.info/format/tga/corion.htm
  64. # Compressed color-mapped data, using Huffman, Delta, and runlength encoding
  65. >2 ubyte 32 - Color
  66. # Compressed color-mapped data, using Huffman, Delta, and RLE. 4-pass quadtree- type process
  67. >2 ubyte 33 - Color
  68. # Color Map Type 0~no 1~color map
  69. >1 ubyte 1 (
  70. # first color map entry, 0 normal
  71. >>3 uleshort >0 \b%d-
  72. # color map length 0 2 1dh 3bh d9h 100h
  73. >>5 uleshort x \b%d)
  74. # 8~run length encoding bit
  75. >2 ubyte&0x08 8 - RLE
  76. # gimp can create big pictures!
  77. >12 uleshort >0 %d x
  78. >12 uleshort =0 65536 x
  79. # image height. 0 interpreted as 65536
  80. >14 uleshort >0 %d
  81. >14 uleshort =0 65536
  82. # Image Pixel depth 1 8 15 16 24 32
  83. >16 ubyte x x %d
  84. # X origin of image. 0 normal
  85. >8 uleshort >0 +%d
  86. # Y origin of image. 0 normal; positive for top
  87. >10 uleshort >0 +%d
  88. # Image descriptor: bits 3-0 give the alpha channel depth, bits 5-4 give direction
  89. >17 ubyte&0x0F >0 - %d-bit alpha
  90. # bits 5-4 give direction. normal bottom left
  91. >17 ubyte &0x20 - top
  92. #>17 ubyte ^0x20 - bottom
  93. >17 ubyte &0x10 - right
  94. #>17 ubyte ^0x10 - left
  95. # some info say other bits 6-7 should be zero
  96. # but data storage interleave by http://www.fileformat.info/format/tga/corion.htm
  97. # 00 - no interleave;01 - even/odd interleave; 10 - four way interleave; 11 - reserved
  98. #>17 ubyte&0xC0 0x00 - no interleave
  99. >17 ubyte&0xC0 0x40 - interleave
  100. >17 ubyte&0xC0 0x80 - four way interleave
  101. >17 ubyte&0xC0 0xC0 - reserved
  102. # positive length implies identification field
  103. >0 ubyte >0
  104. >>18 string x "%s"
  105. # last 18 bytes of newer tga file footer signature
  106. >18 search/4261301/s TRUEVISION-XFILE.\0
  107. # extension area offset if not 0
  108. >>&-8 ulelong >0
  109. # length of the extension area. normal 495 for version 2.0
  110. >>>(&-4.l) uleshort 0x01EF
  111. # AuthorName[41]
  112. >>>>&0 string >\0 - author "%-.40s"
  113. # Comment[324]=4 * 80 null terminated
  114. >>>>&41 string >\0 - comment "%-.80s"
  115. # date
  116. >>>>&365 ubequad&0xffffFFFFffff0000 !0
  117. # Day
  118. >>>>>&-6 uleshort x %d
  119. # Month
  120. >>>>>&-8 uleshort x \b-%d
  121. # Year
  122. >>>>>&-4 uleshort x \b-%d
  123. # time
  124. >>>>&371 ubequad&0xffffFFFFffff0000 !0
  125. # hour
  126. >>>>>&-8 uleshort x %d
  127. # minutes
  128. >>>>>&-6 uleshort x \b:%.2d
  129. # second
  130. >>>>>&-4 uleshort x \b:%.2d
  131. # JobName[41]
  132. >>>>&377 string >\0 - job "%-.40s"
  133. # JobHour Jobminute Jobsecond
  134. >>>>&418 ubequad&0xffffFFFFffff0000 !0
  135. >>>>>&-8 uleshort x %d
  136. >>>>>&-6 uleshort x \b:%.2d
  137. >>>>>&-4 uleshort x \b:%.2d
  138. # SoftwareId[41]
  139. >>>>&424 string >\0 - %-.40s
  140. # SoftwareVersionNumber
  141. >>>>&424 ubyte >0
  142. >>>>>&40 uleshort/100 x %d
  143. >>>>>&40 uleshort%100 x \b.%d
  144. # VersionLetter
  145. >>>>>&42 ubyte >0x20 \b%c
  146. # KeyColor
  147. >>>>&468 ulelong >0 - keycolor 0x%8.8x
  148. # Denominator of Pixel ratio. 0~no pixel aspect
  149. >>>>&474 uleshort >0
  150. # Numerator
  151. >>>>>&-4 uleshort >0 - aspect %d
  152. >>>>>&-2 uleshort x \b/%d
  153. # Denominator of Gamma ratio. 0~no Gamma value
  154. >>>>&478 uleshort >0
  155. # Numerator
  156. >>>>>&-4 uleshort >0 - gamma %d
  157. >>>>>&-2 uleshort x \b/%d
  158. # ColorOffset
  159. #>>>>&480 ulelong x - col offset 0x%8.8x
  160. # StampOffset
  161. #>>>>&484 ulelong x - stamp offset 0x%8.8x
  162. # ScanOffset
  163. #>>>>&488 ulelong x - scan offset 0x%8.8x
  164. # AttributesType
  165. #>>>>&492 ubyte x - Attributes 0x%x
  166. ## EndOfTGA
  167. # PBMPLUS images
  168. # The next byte following the magic is always whitespace.
  169. # strength is changed to try these patterns before "x86 boot sector"
  170. 0 name netpbm
  171. >3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm image data
  172. >>&0 regex =[0-9]{1,50} \b, size = %s x
  173. >>>&0 regex =[0-9]{1,50} \b %s
  174. 0 search/1 P1
  175. >0 regex/4 P1[\040\t\f\r\n]
  176. >>0 use netpbm
  177. >>0 string x \b, bitmap
  178. !:strength + 65
  179. !:mime image/x-portable-bitmap
  180. 0 search/1 P2
  181. >0 regex/4 P2[\040\t\f\r\n]
  182. >>0 use netpbm
  183. >>0 string x \b, greymap
  184. !:strength + 65
  185. !:mime image/x-portable-greymap
  186. 0 search/1 P3
  187. >0 regex/4 P3[\040\t\f\r\n]
  188. >>0 use netpbm
  189. >>0 string x \b, pixmap
  190. !:strength + 65
  191. !:mime image/x-portable-pixmap
  192. 0 string P4
  193. >0 regex/4 P4[\040\t\f\r\n]
  194. >>0 use netpbm
  195. >>0 string x \b, rawbits, bitmap
  196. !:strength + 65
  197. !:mime image/x-portable-bitmap
  198. 0 string P5
  199. >0 regex/4 P5[\040\t\f\r\n]
  200. >>0 use netpbm
  201. >>0 string x \b, rawbits, greymap
  202. !:strength + 65
  203. !:mime image/x-portable-greymap
  204. 0 string P6
  205. >0 regex/4 P6[\040\t\f\r\n]
  206. >>0 use netpbm
  207. >>0 string x \b, rawbits, pixmap
  208. !:strength + 65
  209. !:mime image/x-portable-pixmap
  210. 0 string P7 Netpbm PAM image file
  211. !:mime image/x-portable-pixmap
  212. # From: bryanh@giraffe-data.com (Bryan Henderson)
  213. 0 string \117\072 Solitaire Image Recorder format
  214. >4 string \013 MGI Type 11
  215. >4 string \021 MGI Type 17
  216. 0 string .MDA MicroDesign data
  217. >21 byte 48 version 2
  218. >21 byte 51 version 3
  219. 0 string .MDP MicroDesign page data
  220. >21 byte 48 version 2
  221. >21 byte 51 version 3
  222. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  223. # [GRR: this *must* go before TIFF]
  224. 0 string IIN1 NIFF image data
  225. !:mime image/x-niff
  226. # Canon RAW version 1 (CRW) files are a type of Canon Image File Format
  227. # (CIFF) file. These are apparently all little-endian.
  228. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  229. # URL: https://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
  230. 0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data
  231. !:mime image/x-canon-crw
  232. >16 leshort x \b, version %d.
  233. >14 leshort x \b%d
  234. # Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
  235. # number. Put this above the TIFF test to make sure we detect them.
  236. # These are apparently all little-endian.
  237. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  238. # URL: https://libopenraw.freedesktop.org/wiki/Canon_CR2
  239. 0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data
  240. !:mime image/x-canon-cr2
  241. !:strength +80
  242. >10 byte x \b, version %d.
  243. >11 byte x \b%d
  244. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  245. # The second word of TIFF files is the TIFF version number, 42, which has
  246. # never changed. The TIFF specification recommends testing for it.
  247. 0 string MM\x00\x2a TIFF image data, big-endian
  248. !:strength +70
  249. !:mime image/tiff
  250. >(4.L) use \^tiff_ifd
  251. 0 string II\x2a\x00 TIFF image data, little-endian
  252. !:mime image/tiff
  253. !:strength +70
  254. >(4.l) use tiff_ifd
  255. 0 name tiff_ifd
  256. >0 leshort x \b, direntries=%d
  257. >2 use tiff_entry
  258. 0 name tiff_entry
  259. # NewSubFileType
  260. >0 leshort 0xfe
  261. >>12 use tiff_entry
  262. >0 leshort 0x100
  263. >>4 lelong 1
  264. >>>12 use tiff_entry
  265. >>>8 leshort x \b, width=%d
  266. >0 leshort 0x101
  267. >>4 lelong 1
  268. >>>8 leshort x \b, height=%d
  269. >>>12 use tiff_entry
  270. >0 leshort 0x102
  271. >>8 leshort x \b, bps=%d
  272. >>12 use tiff_entry
  273. >0 leshort 0x103
  274. >>4 lelong 1 \b, compression=
  275. >>>8 leshort 1 \bnone
  276. >>>8 leshort 2 \bhuffman
  277. >>>8 leshort 3 \bbi-level group 3
  278. >>>8 leshort 4 \bbi-level group 4
  279. >>>8 leshort 5 \bLZW
  280. >>>8 leshort 6 \bJPEG (old)
  281. >>>8 leshort 7 \bJPEG
  282. >>>8 leshort 8 \bdeflate
  283. >>>8 leshort 9 \bJBIG, ITU-T T.85
  284. >>>8 leshort 0xa \bJBIG, ITU-T T.43
  285. >>>8 leshort 0x7ffe \bNeXT RLE 2-bit
  286. >>>8 leshort 0x8005 \bPackBits (Macintosh RLE)
  287. >>>8 leshort 0x8029 \bThunderscan RLE
  288. >>>8 leshort 0x807f \bRasterPadding (CT or MP)
  289. >>>8 leshort 0x8080 \bRLE (Line Work)
  290. >>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone)
  291. >>>8 leshort 0x8082 \bRLE (Binary Line Work)
  292. >>>8 leshort 0x80b2 \bDeflate (PKZIP)
  293. >>>8 leshort 0x80b3 \bKodak DCS
  294. >>>8 leshort 0x8765 \bJBIG
  295. >>>8 leshort 0x8798 \bJPEG2000
  296. >>>8 leshort 0x8799 \bNikon NEF Compressed
  297. >>>8 default x
  298. >>>>8 leshort x \b(unknown 0x%x)
  299. >>>12 use tiff_entry
  300. >0 leshort 0x106 \b, PhotometricIntepretation=
  301. >>8 clear x
  302. >>8 leshort 0 \bWhiteIsZero
  303. >>8 leshort 1 \bBlackIsZero
  304. >>8 leshort 2 \bRGB
  305. >>8 leshort 3 \bRGB Palette
  306. >>8 leshort 4 \bTransparency Mask
  307. >>8 leshort 5 \bCMYK
  308. >>8 leshort 6 \bYCbCr
  309. >>8 leshort 8 \bCIELab
  310. >>8 default x
  311. >>>8 leshort x \b(unknown=0x%x)
  312. >>12 use tiff_entry
  313. # FillOrder
  314. >0 leshort 0x10a
  315. >>4 lelong 1
  316. >>>12 use tiff_entry
  317. # DocumentName
  318. >0 leshort 0x10d
  319. >>(8.l) string x \b, name=%s
  320. >>>12 use tiff_entry
  321. # ImageDescription
  322. >0 leshort 0x10e
  323. >>(8.l) string x \b, description=%s
  324. >>>12 use tiff_entry
  325. # Make
  326. >0 leshort 0x10f
  327. >>(8.l) string x \b, manufacturer=%s
  328. >>>12 use tiff_entry
  329. # Model
  330. >0 leshort 0x110
  331. >>(8.l) string x \b, model=%s
  332. >>>12 use tiff_entry
  333. # StripOffsets
  334. >0 leshort 0x111
  335. >>12 use tiff_entry
  336. # Orientation
  337. >0 leshort 0x112 \b, orientation=
  338. >>8 leshort 1 \bupper-left
  339. >>8 leshort 3 \blower-right
  340. >>8 leshort 6 \bupper-right
  341. >>8 leshort 8 \blower-left
  342. >>8 leshort 9 \bundefined
  343. >>8 default x
  344. >>>8 leshort x \b[*%d*]
  345. >>12 use tiff_entry
  346. # XResolution
  347. >0 leshort 0x11a
  348. >>8 lelong x \b, xresolution=%d
  349. >>12 use tiff_entry
  350. # YResolution
  351. >0 leshort 0x11b
  352. >>8 lelong x \b, yresolution=%d
  353. >>12 use tiff_entry
  354. # ResolutionUnit
  355. >0 leshort 0x128
  356. >>8 leshort x \b, resolutionunit=%d
  357. >>12 use tiff_entry
  358. # Software
  359. >0 leshort 0x131
  360. >>(8.l) string x \b, software=%s
  361. >>12 use tiff_entry
  362. # Datetime
  363. >0 leshort 0x132
  364. >>(8.l) string x \b, datetime=%s
  365. >>12 use tiff_entry
  366. # HostComputer
  367. >0 leshort 0x13c
  368. >>(8.l) string x \b, hostcomputer=%s
  369. >>12 use tiff_entry
  370. # WhitePoint
  371. >0 leshort 0x13e
  372. >>12 use tiff_entry
  373. # PrimaryChromaticities
  374. >0 leshort 0x13f
  375. >>12 use tiff_entry
  376. # YCbCrCoefficients
  377. >0 leshort 0x211
  378. >>12 use tiff_entry
  379. # YCbCrPositioning
  380. >0 leshort 0x213
  381. >>12 use tiff_entry
  382. # ReferenceBlackWhite
  383. >0 leshort 0x214
  384. >>12 use tiff_entry
  385. # Copyright
  386. >0 leshort 0x8298
  387. >>(8.l) string x \b, copyright=%s
  388. >>12 use tiff_entry
  389. # ExifOffset
  390. >0 leshort 0x8769
  391. >>12 use tiff_entry
  392. # GPS IFD
  393. >0 leshort 0x8825 \b, GPS-Data
  394. >>12 use tiff_entry
  395. #>0 leshort x \b, unknown=0x%x
  396. #>>12 use tiff_entry
  397. 0 string MM\x00\x2b Big TIFF image data, big-endian
  398. !:mime image/tiff
  399. 0 string II\x2b\x00 Big TIFF image data, little-endian
  400. !:mime image/tiff
  401. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  402. # (Greg Roelofs, newt@uchicago.edu)
  403. # (Albert Cahalan, acahalan@cs.uml.edu)
  404. #
  405. # 137 P N G \r \n ^Z \n [4-byte length] I H D R [HEAD data] [HEAD crc] ...
  406. #
  407. # IHDR parser
  408. 0 name png-ihdr
  409. >0 belong x \b, %d x
  410. >4 belong x %d,
  411. >8 byte x %d-bit
  412. >9 byte 0 grayscale,
  413. >9 byte 2 \b/color RGB,
  414. >9 byte 3 colormap,
  415. >9 byte 4 gray+alpha,
  416. >9 byte 6 \b/color RGBA,
  417. #>10 byte 0 deflate/32K,
  418. >12 byte 0 non-interlaced
  419. >12 byte 1 interlaced
  420. # Standard PNG image.
  421. 0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0DIHDR PNG image data
  422. !:mime image/png
  423. !:ext png
  424. !:strength +10
  425. >16 use png-ihdr
  426. # Apple CgBI PNG image.
  427. 0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x04CgBI
  428. >24 string \x00\x00\x00\x0DIHDR PNG image data (CgBI)
  429. !:mime image/png
  430. !:ext png
  431. !:strength +10
  432. >>32 use png-ihdr
  433. # possible GIF replacements; none yet released!
  434. # (Greg Roelofs, newt@uchicago.edu)
  435. #
  436. # GRR 950115: this was mine ("Zip GIF"):
  437. 0 string GIF94z ZIF image (GIF+deflate alpha)
  438. !:mime image/x-unknown
  439. #
  440. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  441. #
  442. 0 string FGF95a FGF image (GIF+deflate beta)
  443. !:mime image/x-unknown
  444. #
  445. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  446. # (best; not yet implemented):
  447. #
  448. 0 string PBF PBF image (deflate compression)
  449. !:mime image/x-unknown
  450. # GIF
  451. # Strength set up to beat 0x55AA DOS/MBR signature word lookups (+65)
  452. 0 string GIF8 GIF image data
  453. !:strength +80
  454. !:mime image/gif
  455. !:apple 8BIMGIFf
  456. >4 string 7a \b, version 8%s,
  457. >4 string 9a \b, version 8%s,
  458. >6 leshort >0 %d x
  459. >8 leshort >0 %d
  460. #>10 byte &0x80 color mapped,
  461. #>10 byte&0x07 =0x00 2 colors
  462. #>10 byte&0x07 =0x01 4 colors
  463. #>10 byte&0x07 =0x02 8 colors
  464. #>10 byte&0x07 =0x03 16 colors
  465. #>10 byte&0x07 =0x04 32 colors
  466. #>10 byte&0x07 =0x05 64 colors
  467. #>10 byte&0x07 =0x06 128 colors
  468. #>10 byte&0x07 =0x07 256 colors
  469. # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster,
  470. # 1 plane, no encoding.
  471. 0 string \361\0\100\273 CMU window manager raster image data
  472. >4 lelong >0 %d x
  473. >8 lelong >0 %d,
  474. >12 lelong >0 %d-bit
  475. # Magick Image File Format
  476. # URL: https://imagemagick.org/script/miff.php
  477. # Reference: http://fileformats.archiveteam.org/wiki/MIFF
  478. # Update: Joerg Jenderek
  479. # http://www.nationalarchives.gov.uk/pronom/fmt/930
  480. 0 search/256/bc id=imagemagick
  481. # skip bad ASCII text by following new line~0x0A or space~0x20 character
  482. #>&0 ubyte x \b, next character 0x%x
  483. # called by TriD ImageMagick Machine independent File Format bitmap
  484. >&0 ubyte&0xD5 0 MIFF image data
  485. # https://reposcope.com/mimetype/image/miff
  486. #!:mime image/miff
  487. !:mime image/x-miff
  488. !:ext miff/mif
  489. # examples with standard file(1) magic
  490. #>>0 string =id=ImageMagick with standard magic
  491. # examples with unusual file(1) magic like
  492. >>0 string !id=ImageMagick starting with
  493. # start with comment (brace) like http://samples.fileformat.info/.../AQUARIUM.MIF
  494. >>>0 ubyte =0x7b comment
  495. # skip second character which is often a newline and show comment
  496. >>>>2 string x "%s"
  497. # does not start with comment, probably letters with other case like Id=ImageMagick
  498. # ImageMagick-7.0.9-2/Magick++/demo/smile_anim.miff
  499. >>>0 ubyte !0x7b
  500. >>>>0 string >\0 '%-.14s'
  501. # URL: https://imagemagick.org/
  502. # Reference: https://imagemagick.org/script/magick-vector-graphics.php
  503. # From: Joerg Jenderek
  504. # Note: all white-spaces between commands are ignored
  505. 0 string push
  506. # skip some white spaces
  507. >5 search/3 graphic-context ImageMagick Vector Graphic
  508. # TODO: look for dangerous commands like CVE-2016-3715
  509. #!:mime text/plain
  510. !:mime image/x-mvg
  511. !:ext mvg
  512. # Artisan
  513. 0 long 1123028772 Artisan image data
  514. >4 long 1 \b, rectangular 24-bit
  515. >4 long 2 \b, rectangular 8-bit with colormap
  516. >4 long 3 \b, rectangular 32-bit (24-bit with matte)
  517. # FIG (Facility for Interactive Generation of figures), an object-based format
  518. 0 search/1 #FIG FIG image text
  519. >5 string x \b, version %.3s
  520. # PHIGS
  521. 0 string ARF_BEGARF PHIGS clear text archive
  522. 0 string @(#)SunPHIGS SunPHIGS
  523. # version number follows, in the form m.n
  524. >40 string SunBin binary
  525. >32 string archive archive
  526. # GKS (Graphics Kernel System)
  527. 0 string GKSM GKS Metafile
  528. >24 string SunGKS \b, SunGKS
  529. # CGM image files
  530. 0 string BEGMF clear text Computer Graphics Metafile
  531. # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  532. 0 string yz MGR bitmap, modern format, 8-bit aligned
  533. 0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned
  534. 0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned
  535. 0 string yx MGR bitmap, modern format, squeezed
  536. # Fuzzy Bitmap (FBM) images
  537. 0 string %bitmap\0 FBM image data
  538. >30 long 0x31 \b, mono
  539. >30 long 0x33 \b, color
  540. # facsimile data
  541. 1 string PC\ Research,\ Inc group 3 fax data
  542. >29 byte 0 \b, normal resolution (204x98 DPI)
  543. >29 byte 1 \b, fine resolution (204x196 DPI)
  544. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  545. 0 string Sfff structured fax file
  546. # From: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
  547. # most files with the extension .EPA and some with .BMP
  548. 0 string \x11\x06 Award BIOS Logo, 136 x 84
  549. !:mime image/x-award-bioslogo
  550. 0 string \x11\x09 Award BIOS Logo, 136 x 126
  551. !:mime image/x-award-bioslogo
  552. #0 string \x07\x1f BIOS Logo corrupted?
  553. # http://www.blackfiveservices.co.uk/awbmtools.shtml
  554. # http://biosgfx.narod.ru/v3/
  555. # http://biosgfx.narod.ru/abr-2/
  556. 0 string AWBM
  557. >4 leshort <1981 Award BIOS bitmap
  558. !:mime image/x-award-bmp
  559. # image width is a multiple of 4
  560. >>4 leshort&0x0003 0
  561. >>>4 leshort x \b, %d
  562. >>>6 leshort x x %d
  563. >>4 leshort&0x0003 >0 \b,
  564. >>>4 leshort&0x0003 =1
  565. >>>>4 leshort x %d+3
  566. >>>4 leshort&0x0003 =2
  567. >>>>4 leshort x %d+2
  568. >>>4 leshort&0x0003 =3
  569. >>>>4 leshort x %d+1
  570. >>>6 leshort x x %d
  571. # at offset 8 starts imagedata followed by "RGB " marker
  572. # PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu)
  573. # https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\
  574. # 28bitmap_information_header.29
  575. # Note: variant starting direct with DIB header see
  576. # http://fileformats.archiveteam.org/wiki/BMP
  577. # verified by ImageMagick version 6.8.9-8 command `identify *.dib`
  578. 0 leshort 40
  579. # skip bad samples like GAME by looking for valid number of color planes
  580. >12 uleshort 1 Device independent bitmap graphic
  581. !:mime image/bmp
  582. !:apple ????BMPp
  583. !:ext dib
  584. >>4 lelong x \b, %d x
  585. >>8 lelong x %d x
  586. >>14 leshort x %d
  587. # number of color planes (must be 1)
  588. #>>12 uleshort >1 \b, %u color planes
  589. # compression method: 0~no 1~RLE 8-bit/pixel 3~Huffman 1D
  590. #>>16 ulelong 3 \b, Huffman 1D compression
  591. >>16 ulelong >0 \b, %u compression
  592. # image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps
  593. >>20 ulelong x \b, image size %u
  594. # horizontal and vertical resolution of the image (pixel per metre, signed integer)
  595. >>24 lelong >0 \b, resolution %d x
  596. >>>28 lelong x %d px/m
  597. # number of colors in palette, or 0 to default to 2**n
  598. #>>32 ulelong >0 \b, %u colors
  599. # number of important colors used, or 0 when every color is important
  600. >>36 ulelong >0 \b, %u important colors
  601. 0 string BM
  602. >14 leshort 12 PC bitmap, OS/2 1.x format
  603. !:mime image/x-ms-bmp
  604. >>18 leshort x \b, %d x
  605. >>20 leshort x %d
  606. >14 leshort 64 PC bitmap, OS/2 2.x format
  607. !:mime image/bmp
  608. !:apple ????BMPp
  609. !:ext bmp
  610. # image width and height fields are unsigned integers for OS/2
  611. >>18 ulelong x \b, %u x
  612. >>22 ulelong x %u
  613. # number of bits per pixel (color depth); found 1 4 8
  614. >>28 uleshort >1 x %u
  615. # x, y coordinates of the hotspot
  616. >>6 uleshort >0 \b, hotspot %ux
  617. >>>8 uleshort x \b%u
  618. >>26 uleshort >1 \b, %u color planes
  619. # cbSize; size of file or headers
  620. >>2 ulelong x \b, cbSize %u
  621. #>>2 ulelong x \b, cbSize 0x%x
  622. # offBits; offset to bitmap data like 56h 5Eh 8Eh 43Eh
  623. >>10 ulelong x \b, bits offset %u
  624. #>>10 ulelong x \b, bits offset 0x%x
  625. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  626. # BITMAPV2INFOHEADER adds RGB bit masks
  627. >14 leshort 52 PC bitmap, Adobe Photoshop
  628. !:mime image/bmp
  629. !:apple ????BMPp
  630. !:ext bmp
  631. >>18 lelong x \b, %d x
  632. >>22 lelong x %d x
  633. >>28 leshort x %d
  634. # BITMAPV3INFOHEADER adds alpha channel bit mask
  635. >14 leshort 56 PC bitmap, Adobe Photoshop with alpha channel mask
  636. !:mime image/bmp
  637. !:apple ????BMPp
  638. !:ext bmp
  639. >>18 lelong x \b, %d x
  640. >>22 lelong x %d x
  641. >>28 leshort x %d
  642. >14 leshort 40
  643. # jump 4 bytes before end of file/header to skip fmt-116-signature-id-118.dib
  644. >>(2.l-4) ulong x PC bitmap, Windows 3.x format
  645. !:mime image/bmp
  646. !:apple ????BMPp
  647. >>>18 lelong x \b, %d x
  648. >>>22 lelong x %d
  649. # 320 x 400 https://en.wikipedia.org/wiki/LOGO.SYS
  650. >>>18 ulequad =0x0000019000000140 x
  651. !:ext bmp/sys
  652. >>>18 ulequad !0x0000019000000140
  653. # compression method 2~RLE 4-bit/pixel implies also extension rle
  654. >>>>30 ulelong 2 x
  655. !:ext bmp/rle
  656. >>>>30 default x x
  657. !:ext bmp
  658. # number of bits per pixel (color depth); found 1 2 4 8 16 24 32
  659. >>>28 leshort x %d
  660. # x, y coordinates of the hotspot; there is no hotspot in bitmaps, so values 0
  661. #>>>6 uleshort >0 \b, hotspot %ux
  662. #>>>>8 uleshort x \b%u
  663. # number of color planes (must be 1), except badplanes.bmp for testing
  664. #>>>26 uleshort >1 \b, %u color planes
  665. # compression method: 0~no 1~RLE 8-bit/pixel 2~RLE 4-bit/pixel 3~Huffman 1D 6~RGBA bit field masks
  666. #>>>30 ulelong 3 \b, Huffman 1D compression
  667. >>>30 ulelong >0 \b, %u compression
  668. # image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps
  669. >>>34 ulelong >0 \b, image size %u
  670. # horizontal and vertical resolution of the image (pixel per metre, signed integer)
  671. >>>38 lelong >0 \b, resolution %d x
  672. >>>>42 lelong x %d px/m
  673. # number of colors in palette 16 256, or 0 to default to 2**n
  674. #>>>46 ulelong >0 \b, %u colors
  675. # number of important colors used, or 0 when every color is important
  676. >>>50 ulelong >0 \b, %u important colors
  677. # cbSize; often size of file
  678. >>>2 ulelong x \b, cbSize %u
  679. #>>>2 ulelong x \b, cbSize 0x%x
  680. # offBits; offset to bitmap data like 36h 76h BEh 236h 406h 436h 4E6h
  681. >>>10 ulelong x \b, bits offset %u
  682. #>>>10 ulelong x \b, bits offset 0x%x
  683. #>>>(10.l) ubequad !0 \b, bits 0x%16.16llxd
  684. >14 leshort 124 PC bitmap, Windows 98/2000 and newer format
  685. !:mime image/x-ms-bmp
  686. >>18 lelong x \b, %d x
  687. >>22 lelong x %d x
  688. >>28 leshort x %d
  689. >14 leshort 108 PC bitmap, Windows 95/NT4 and newer format
  690. !:mime image/x-ms-bmp
  691. >>18 lelong x \b, %d x
  692. >>22 lelong x %d x
  693. >>28 leshort x %d
  694. >14 leshort 128 PC bitmap, Windows NT/2000 format
  695. !:mime image/x-ms-bmp
  696. >>18 lelong x \b, %d x
  697. >>22 lelong x %d x
  698. >>28 leshort x %d
  699. # Update: Joerg Jenderek
  700. # URL: http://fileformats.archiveteam.org/wiki/OS/2_Icon
  701. # Reference: http://www.fileformat.info
  702. # /format/os2bmp/spec/902d5c253f2a43ada39c2b81034f27fd/view.htm
  703. # Note: verified by command like `deark -l -d3 OS2MEMU.ICO`
  704. 0 string IC
  705. # skip Lotus smart icon *.smi by looking for valid hotspot coordinates
  706. >6 ulelong&0xFF00FF00 =0 OS/2 icon
  707. # jump 4 bytes before end of header/file and test for accessibility
  708. #>>(2.l-4) ubelong x End of header is OK!
  709. !:mime image/x-os2-ico
  710. !:ext ico
  711. # cbSize; size of header or file in bytes like 1ah 120h 420h
  712. >>2 ulelong x \b, cbSize %u
  713. # xHotspot, yHotspot; coordinates of the hotspot for icons like 16 32
  714. >>6 uleshort x \b, hotspot %ux
  715. >>8 uleshort x \b%u
  716. # offBits; offset in bytes to the beginning of the bit-map pel data like 20h
  717. >>10 ulelong x \b, bits offset %u
  718. #>>(10.l) ubequad x \b, bits 0x%16.16llx
  719. #0 string PI PC pointer image data
  720. #0 string CI PC color icon data
  721. 0 string CI
  722. # test also for valid dib header sizes 12 or 64
  723. >14 ulelong <65 OS/2
  724. # test also for valid hotspot coordinates
  725. #>>6 ulelong&0xFE00FE00 =0 OS/2
  726. !:mime image/x-os2-ico
  727. !:ext ico
  728. >>14 ulelong 12 1.x color icon
  729. # image width and height fields are unsigned integers for OS/2
  730. >>>18 uleshort x %u x
  731. # stored height = 2 * real height
  732. >>>20 uleshort/2 x %u
  733. # number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found
  734. >>>24 uleshort >1 x %u
  735. # color planes; must be 1
  736. #>>>22 uleshort >1 \b, %u color planes
  737. >>14 ulelong 64 2.x color icon
  738. # image width and height
  739. >>>18 ulelong x %u x
  740. # stored height = 2 * real height
  741. >>>22 ulelong/2 x %u
  742. # number of bits per pixel (color depth). only 1 found
  743. >>>28 uleshort >1 x %u
  744. #>>>26 uleshort >1 \b, %u color planes
  745. # compression method: 0~no 3~Huffman 1D
  746. >>>30 ulelong 3 \b, Huffman 1D compression
  747. #>>>30 ulelong >0 \b, %u compression
  748. # xHotspot, yHotspot; coordinates of the hotspot like 0 1 16 20 32 33 63 64
  749. >>6 uleshort x \b, hotspot %ux
  750. >>8 uleshort x \b%u
  751. # cbSize; size of header or maybe file in bytes like 1Ah 4Eh 84Eh
  752. >>2 ulelong x \b, cbSize %u
  753. #>>2 ulelong x \b, cbSize %x
  754. # offBits; offset to bitmap data (pixel array) like E4h 3Ah 66h 6Ah 33Ah 4A4h
  755. >>10 ulelong x \b, bits offset %u
  756. #>>10 ulelong x \b, bits offset 0x%x
  757. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  758. # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
  759. #>>14 ulelong x \b, dib header size %u
  760. #0 string CP PC color pointer image data
  761. # URL: http://fileformats.archiveteam.org/wiki/OS/2_Pointer
  762. # Reference: http://www.fileformat.info/format/os2bmp/egff.htm
  763. 0 string CP
  764. # skip CPU-Z Report by checking for valid dib header sizes 12 or 64
  765. >14 ulelong <65 OS/2
  766. # http://extension.nirsoft.net/PTR
  767. !:mime image/x-ibm-pointer
  768. !:ext ptr
  769. >>14 ulelong 12 1.x color pointer
  770. # image width and height fields are unsigned integers for OS/2
  771. >>>18 uleshort x %u x
  772. # stored height = 2 * real height
  773. >>>20 uleshort/2 x %u
  774. # number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found
  775. >>>24 uleshort >1 x %u
  776. # color planes; must be 1
  777. #>>>22 uleshort >1 \b, %u color planes
  778. >>14 ulelong 64 2.x color pointer
  779. # image width and height
  780. >>>18 ulelong x %u x
  781. # stored height = 2 * real height
  782. >>>22 ulelong/2 x %u
  783. # number of bits per pixel (color depth). only 1 found
  784. >>>28 uleshort >1 x %u
  785. #>>>26 uleshort >1 \b, %u color planes
  786. # compression method: 0~no 3~Huffman 1D
  787. >>>30 ulelong 3 \b, Huffman 1D compression
  788. #>>>30 ulelong >0 \b, %u compression
  789. # xHotspot, yHotspot; coordinates of the hotspot like 0 3 4 8 15 16 23 27 31
  790. >>6 uleshort x \b, hotspot %ux
  791. >>8 uleshort x \b%u
  792. # cbSize; size of header or maybe file in bytes like 1Ah 4Eh
  793. >>2 ulelong x \b, cbSize %u
  794. #>>2 ulelong x \b, cbSize %x
  795. # offBits; offset to bitmap data (pixel array) like 6Ah A4h E4h 4A4h
  796. >>10 ulelong x \b, bits offset %u
  797. #>>10 ulelong x \b, bits offset 0x%x
  798. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  799. # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
  800. #>>14 ulelong x \b, dib header size %u
  801. # Conflicts with other entries [BABYL]
  802. # URL: http://fileformats.archiveteam.org/wiki/BMP#OS.2F2_Bitmap_Array
  803. # Note: container for OS/2 icon "IC", color icon "CI", color pointer "CP" or bitmap "BM"
  804. #0 string BA PC bitmap array data
  805. 0 string BA
  806. # skip old Emacs RMAIL BABYL ./mail.news by checking for low header size
  807. >2 ulelong <0x004c5942 OS/2 graphic array
  808. !:mime image/x-os2-graphics
  809. #!:apple ????BMPf
  810. # cbSize; size of header like 28h 5Ch
  811. >>2 ulelong x \b, cbSize %u
  812. #>>2 ulelong x \b, cbSize 0x%x
  813. # offNext; offset to data like 0 48h F2h 4Eh 64h C6h D2h D6h DAh E6h EAh 348h
  814. >>6 ulelong >0 \b, data offset %u
  815. #>>6 ulelong >0 \b, data offset 0x%x
  816. #>>(6.l) ubequad !0 \b, data 0x%16.16llx
  817. # dimensions of the intended device like 640 x 480 for VGA or 1024 x 768
  818. >>10 uleshort >0 \b, display %u
  819. >>>12 uleshort >0 x %u
  820. # usType of first array element
  821. #>>14 string x \b, usType %2.2s
  822. # 1 space char after "1st"
  823. # no *.bga examples found https://www.openwith.org/file-extensions/bga/1342
  824. >>14 string BM \b; 1st
  825. !:ext bmp/bga
  826. >>14 string CI \b; 1st
  827. !:ext ico
  828. >>14 string CP \b; 1st
  829. !:ext ico
  830. >>14 string IC \b; 1st
  831. !:ext ico
  832. # no white-black pointer found
  833. #>>14 string PT \b; 1st
  834. #!:ext
  835. >>14 indirect x
  836. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  837. 0 search/1 /*\ XPM\ */ X pixmap image text
  838. !:mime image/x-xpmi
  839. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  840. 0 leshort 0xcc52 RLE image data,
  841. >6 leshort x %d x
  842. >8 leshort x %d
  843. >2 leshort >0 \b, lower left corner: %d
  844. >4 leshort >0 \b, lower right corner: %d
  845. >10 byte&0x1 =0x1 \b, clear first
  846. >10 byte&0x2 =0x2 \b, no background
  847. >10 byte&0x4 =0x4 \b, alpha channel
  848. >10 byte&0x8 =0x8 \b, comment
  849. >11 byte >0 \b, %d color channels
  850. >12 byte >0 \b, %d bits per pixel
  851. >13 byte >0 \b, %d color map channels
  852. # image file format (Robert Potter, potter@cs.rochester.edu)
  853. 0 string Imagefile\ version- iff image data
  854. # this adds the whole header (inc. version number), informative but longish
  855. >10 string >\0 %s
  856. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  857. 0 belong 0x59a66a95 Sun raster image data
  858. >4 belong >0 \b, %d x
  859. >8 belong >0 %d,
  860. >12 belong >0 %d-bit,
  861. #>16 belong >0 %d bytes long,
  862. >20 belong 0 old format,
  863. #>20 belong 1 standard,
  864. >20 belong 2 compressed,
  865. >20 belong 3 RGB,
  866. >20 belong 4 TIFF,
  867. >20 belong 5 IFF,
  868. >20 belong 0xffff reserved for testing,
  869. >24 belong 0 no colormap
  870. >24 belong 1 RGB colormap
  871. >24 belong 2 raw colormap
  872. #>28 belong >0 colormap is %d bytes long
  873. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  874. #
  875. # See
  876. # http://reality.sgi.com/grafica/sgiimage.html
  877. #
  878. 0 beshort 474 SGI image data
  879. #>2 byte 0 \b, verbatim
  880. >2 byte 1 \b, RLE
  881. #>3 byte 1 \b, normal precision
  882. >3 byte 2 \b, high precision
  883. >4 beshort x \b, %d-D
  884. >6 beshort x \b, %d x
  885. >8 beshort x %d
  886. >10 beshort x \b, %d channel
  887. >10 beshort !1 \bs
  888. >80 string >0 \b, "%s"
  889. 0 string IT01 FIT image data
  890. >4 belong x \b, %d x
  891. >8 belong x %d x
  892. >12 belong x %d
  893. #
  894. 0 string IT02 FIT image data
  895. >4 belong x \b, %d x
  896. >8 belong x %d x
  897. >12 belong x %d
  898. #
  899. 2048 string PCD_IPI Kodak Photo CD image pack file
  900. >0xe02 byte&0x03 0x00 , landscape mode
  901. >0xe02 byte&0x03 0x01 , portrait mode
  902. >0xe02 byte&0x03 0x02 , landscape mode
  903. >0xe02 byte&0x03 0x03 , portrait mode
  904. 0 string PCD_OPA Kodak Photo CD overview pack file
  905. # FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  906. # FITS is the Flexible Image Transport System, the de facto standard for
  907. # data and image transfer, storage, etc., for the astronomical community.
  908. # (FITS floating point formats are big-endian.)
  909. 0 string SIMPLE\ \ = FITS image data
  910. !:mime image/fits
  911. !:ext fits/fts
  912. >109 string 8 \b, 8-bit, character or unsigned binary integer
  913. >108 string 16 \b, 16-bit, two's complement binary integer
  914. >107 string \ 32 \b, 32-bit, two's complement binary integer
  915. >107 string -32 \b, 32-bit, floating point, single precision
  916. >107 string -64 \b, 64-bit, floating point, double precision
  917. # other images
  918. 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file
  919. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  920. # stuff.
  921. #
  922. 0 beshort 0x1010 PEX Binary Archive
  923. # DICOM medical imaging data
  924. # URL: https://en.wikipedia.org/wiki/DICOM#Data_format
  925. # Note: "dcm" is the official file name extension
  926. # XnView mention also "dc3" and "acr" as file name extension
  927. 128 string DICM DICOM medical imaging data
  928. !:mime application/dicom
  929. !:ext dcm/dicom/dic
  930. # XWD - X Window Dump file.
  931. # As described in /usr/X11R6/include/X11/XWDFile.h
  932. # used by the xwd program.
  933. # Bradford Castalia, idaeim, 1/01
  934. # updated by Adam Buchbinder, 2/09
  935. # The following assumes version 7 of the format; the first long is the length
  936. # of the header, which is at least 25 4-byte longs, and the one at offset 8
  937. # is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
  938. # which is a maximum of 32.
  939. 0 belong >100
  940. >8 belong <3
  941. >>12 belong <33
  942. >>>4 belong 7 XWD X Window Dump image data
  943. !:mime image/x-xwindowdump
  944. >>>>100 string >\0 \b, "%s"
  945. >>>>16 belong x \b, %dx
  946. >>>>20 belong x \b%dx
  947. >>>>12 belong x \b%d
  948. # PDS - Planetary Data System
  949. # These files use Parameter Value Language in the header section.
  950. # Unfortunately, there is no certain magic, but the following
  951. # strings have been found to be most likely.
  952. 0 string NJPL1I00 PDS (JPL) image data
  953. 2 string NJPL1I PDS (JPL) image data
  954. 0 string CCSD3ZF PDS (CCSD) image data
  955. 2 string CCSD3Z PDS (CCSD) image data
  956. 0 string PDS_ PDS image data
  957. 0 string LBLSIZE= PDS (VICAR) image data
  958. # pM8x: ATARI STAD compressed bitmap format
  959. #
  960. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  961. # p M 8 5/6 xx yy zz data...
  962. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  963. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  964. # most frequent byte, xx and zz are runlength escape codes, where xx is
  965. # used for runs of yy.
  966. #
  967. 0 string pM85 Atari ST STAD bitmap image data (hor)
  968. >5 byte 0x00 (white background)
  969. >5 byte 0xFF (black background)
  970. 0 string pM86 Atari ST STAD bitmap image data (vert)
  971. >5 byte 0x00 (white background)
  972. >5 byte 0xFF (black background)
  973. # From: Alex Myczko <alex@aiei.ch>
  974. # https://www.atarimax.com/jindroush.atari.org/afmtatr.html
  975. 0 leshort 0x0296 Atari ATR image
  976. # XXX:
  977. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  978. # magic.
  979. # SGI RICE image file <mpruett@sgi.com>
  980. #0 beshort 0x5249 RICE image
  981. #>2 beshort x v%d
  982. #>4 beshort x (%d x
  983. #>6 beshort x %d)
  984. #>8 beshort 0 8 bit
  985. #>8 beshort 1 10 bit
  986. #>8 beshort 2 12 bit
  987. #>8 beshort 3 13 bit
  988. #>10 beshort 0 4:2:2
  989. #>10 beshort 1 4:2:2:4
  990. #>10 beshort 2 4:4:4
  991. #>10 beshort 3 4:4:4:4
  992. #>12 beshort 1 RGB
  993. #>12 beshort 2 CCIR601
  994. #>12 beshort 3 RP175
  995. #>12 beshort 4 YUV
  996. # PCX image files
  997. # From: Dan Fandrich <dan@coneharvesters.com>
  998. # updated by Joerg Jenderek at Feb 2013 by https://de.wikipedia.org/wiki/PCX
  999. # https://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt
  1000. # GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000
  1001. # 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
  1002. 0 ubelong&0xffF8fe00 0x0a000000
  1003. # for PCX bit depth > 0
  1004. >3 ubyte >0
  1005. # test for valid versions
  1006. >>1 ubyte <6
  1007. >>>1 ubyte !1 PCX
  1008. !:mime image/x-pcx
  1009. #!:mime image/pcx
  1010. >>>>1 ubyte 0 ver. 2.5 image data
  1011. >>>>1 ubyte 2 ver. 2.8 image data, with palette
  1012. >>>>1 ubyte 3 ver. 2.8 image data, without palette
  1013. >>>>1 ubyte 4 for Windows image data
  1014. >>>>1 ubyte 5 ver. 3.0 image data
  1015. >>>>4 uleshort x bounding box [%d,
  1016. >>>>6 uleshort x %d] -
  1017. >>>>8 uleshort x [%d,
  1018. >>>>10 uleshort x %d],
  1019. >>>>65 ubyte >1 %d planes each of
  1020. >>>>3 ubyte x %d-bit
  1021. >>>>68 byte 1 colour,
  1022. >>>>68 byte 2 grayscale,
  1023. # this should not happen
  1024. >>>>68 default x image,
  1025. >>>>12 leshort >0 %d x
  1026. >>>>>14 uleshort x %d dpi,
  1027. >>>>2 byte 0 uncompressed
  1028. >>>>2 byte 1 RLE compressed
  1029. # Adobe Photoshop
  1030. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  1031. 0 string 8BPS Adobe Photoshop Image
  1032. !:mime image/vnd.adobe.photoshop
  1033. >4 beshort 2 (PSB)
  1034. >18 belong x \b, %d x
  1035. >14 belong x %d,
  1036. >24 beshort 0 bitmap
  1037. >24 beshort 1 grayscale
  1038. >>12 beshort 2 with alpha
  1039. >24 beshort 2 indexed
  1040. >24 beshort 3 RGB
  1041. >>12 beshort 4 \bA
  1042. >24 beshort 4 CMYK
  1043. >>12 beshort 5 \bA
  1044. >24 beshort 7 multichannel
  1045. >24 beshort 8 duotone
  1046. >24 beshort 9 lab
  1047. >12 beshort > 1
  1048. >>12 beshort x \b, %dx
  1049. >12 beshort 1 \b,
  1050. >22 beshort x %d-bit channel
  1051. >12 beshort > 1 \bs
  1052. # XV thumbnail indicator (ThMO)
  1053. 0 string P7\ 332 XV thumbnail image data
  1054. # NITF is defined by United States MIL-STD-2500A
  1055. 0 string NITF National Imagery Transmission Format
  1056. >25 string >\0 dated %.14s
  1057. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  1058. # Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de>
  1059. # Update: Joerg Jenderek
  1060. # See http://fileformats.archiveteam.org/wiki/GEM_Raster
  1061. # For variations, also see:
  1062. # https://www.seasip.info/Gem/ff_img.html (Ventura)
  1063. # http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT)
  1064. # http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT)
  1065. # http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG)
  1066. 0 beshort 0x0001
  1067. # header_size
  1068. >2 beshort 0x0008
  1069. >>0 use gem_info
  1070. >2 beshort 0x0009
  1071. >>0 use gem_info
  1072. # no example for NOSIG
  1073. >2 beshort 24
  1074. >>0 use gem_info
  1075. # no example for HYPERPAINT
  1076. >2 beshort 25
  1077. >>0 use gem_info
  1078. 16 string XIMG\0
  1079. >0 use gem_info
  1080. # no example
  1081. 16 string STTT\0\x10
  1082. >0 use gem_info
  1083. # no example or description
  1084. 16 string TIMG\0
  1085. >0 use gem_info
  1086. 0 name gem_info
  1087. # version is 2 for some XIMG and 1 for all others
  1088. >0 beshort <0x0003 GEM
  1089. # https://www.snowstone.org.uk/riscos/mimeman/mimemap.txt
  1090. !:mime image/x-gem
  1091. # header_size 24 25 27 59 779 words for colored bitmaps
  1092. >>2 beshort >9
  1093. >>>16 string STTT\0\x10 STTT
  1094. >>>16 string TIMG\0 TIMG
  1095. # HYPERPAINT or NOSIG variant
  1096. >>>16 string \0\x80
  1097. >>>>2 beshort =24 NOSIG
  1098. >>>>2 beshort !24 HYPERPAINT
  1099. # NOSIG or XIMG variant
  1100. >>>16 default x
  1101. >>>>16 string !XIMG\0 NOSIG
  1102. >>16 string =XIMG\0 XIMG Image data
  1103. !:ext img/ximg
  1104. # to avoid Warning: Current entry does not yet have a description for adding a EXTENSION type
  1105. >>16 string !XIMG\0 Image data
  1106. !:ext img
  1107. # header_size is 9 for Ventura files and 8 for other GEM Paint files
  1108. >>2 beshort 9 (Ventura)
  1109. #>>2 beshort 8 (Paint)
  1110. >>12 beshort x %d x
  1111. >>14 beshort x %d,
  1112. # 1 4 8
  1113. >>4 beshort x %d planes,
  1114. # in tenths of a millimetre
  1115. >>8 beshort x %d x
  1116. >>10 beshort x %d pixelsize
  1117. # pattern_size 1-8. 2 for GEM Paint
  1118. >>6 beshort !2 \b, pattern size %d
  1119. # GEM Metafile (Wolfram Kleff)
  1120. 0 lelong 0x0018FFFF GEM Metafile data
  1121. >4 leshort x version %d
  1122. #
  1123. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  1124. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  1125. #
  1126. 0 string \0\nSMJPEG SMJPEG
  1127. >8 belong x %d.x data
  1128. # According to the specification you could find any number of _TXT
  1129. # headers here, but I can't think of any way of handling that. None of
  1130. # the SMJPEG files I tried it on used this feature. Even if such a
  1131. # file is encountered the output should still be reasonable.
  1132. >16 string _SND \b,
  1133. >>24 beshort >0 %d Hz
  1134. >>26 byte 8 8-bit
  1135. >>26 byte 16 16-bit
  1136. >>28 string NONE uncompressed
  1137. # >>28 string APCM ADPCM compressed
  1138. >>27 byte 1 mono
  1139. >>28 byte 2 stereo
  1140. # Help! Isn't there any way to avoid writing this part twice?
  1141. >>32 string _VID \b,
  1142. # >>>48 string JFIF JPEG
  1143. >>>40 belong >0 %d frames
  1144. >>>44 beshort >0 (%d x
  1145. >>>46 beshort >0 %d)
  1146. >16 string _VID \b,
  1147. # >>32 string JFIF JPEG
  1148. >>24 belong >0 %d frames
  1149. >>28 beshort >0 (%d x
  1150. >>30 beshort >0 %d)
  1151. 0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File
  1152. # "thumbnail file" (icon)
  1153. # descended from "xv", but in use by other applications as well (Wolfram Kleff)
  1154. 0 string P7\ 332 XV "thumbnail file" (icon) data
  1155. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  1156. 0 string KiSS KISS/GS
  1157. >4 byte 16 color
  1158. >>5 byte x %d bit
  1159. >>8 leshort x %d colors
  1160. >>10 leshort x %d groups
  1161. >4 byte 32 cell
  1162. >>5 byte x %d bit
  1163. >>8 leshort x %d x
  1164. >>10 leshort x %d
  1165. >>12 leshort x +%d
  1166. >>14 leshort x +%d
  1167. # Webshots (www.webshots.com), by John Harrison
  1168. 0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  1169. # Hercules DASD image files
  1170. # From Jan Jaeger <jj@septa.nl>
  1171. 0 string CKD_P370 Hercules CKD DASD image file
  1172. >8 long x \b, %d heads per cylinder
  1173. >12 long x \b, track size %d bytes
  1174. >16 byte x \b, device type 33%2.2X
  1175. 0 string CKD_C370 Hercules compressed CKD DASD image file
  1176. >8 long x \b, %d heads per cylinder
  1177. >12 long x \b, track size %d bytes
  1178. >16 byte x \b, device type 33%2.2X
  1179. 0 string CKD_S370 Hercules CKD DASD shadow file
  1180. >8 long x \b, %d heads per cylinder
  1181. >12 long x \b, track size %d bytes
  1182. >16 byte x \b, device type 33%2.2X
  1183. # Squeak images and programs - etoffi@softhome.net
  1184. 0 string \146\031\0\0 Squeak image data
  1185. 0 search/1 'From\040Squeak Squeak program text
  1186. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  1187. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  1188. 0 string PaRtImAgE-VoLuMe PartImage
  1189. >0x0020 string 0.6.1 file version %s
  1190. >>0x0060 lelong >-1 volume %d
  1191. #>>0x0064 8 byte identifier
  1192. #>>0x007c reserved
  1193. >>0x0200 string >\0 type %s
  1194. >>0x1400 string >\0 device %s,
  1195. >>0x1600 string >\0 original filename %s,
  1196. # Some fields omitted
  1197. >>0x2744 lelong 0 not compressed
  1198. >>0x2744 lelong 1 gzip compressed
  1199. >>0x2744 lelong 2 bzip2 compressed
  1200. >>0x2744 lelong >2 compressed with unknown algorithm
  1201. >0x0020 string >0.6.1 file version %s
  1202. >0x0020 string <0.6.1 file version %s
  1203. # DCX is multi-page PCX, using a simple header of up to 1024
  1204. # offsets for the respective PCX components.
  1205. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  1206. 0 lelong 987654321 DCX multi-page PCX image data
  1207. # Simon Walton <simonw@matteworld.com>
  1208. # Kodak Cineon format for scanned negatives
  1209. # http://www.kodak.com/US/en/motion/support/dlad/
  1210. 0 lelong 0xd75f2a80 Cineon image data
  1211. >200 belong >0 \b, %d x
  1212. >204 belong >0 %d
  1213. # Bio-Rad .PIC is an image format used by microscope control systems
  1214. # and related image processing software used by biologists.
  1215. # From: Vebjorn Ljosa <vebjorn@ljosa.com>
  1216. # BOOL values are two-byte integers; use them to rule out false positives.
  1217. # https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
  1218. # Samples: https://www.loci.wisc.edu/software/sample-data
  1219. 14 leshort <2
  1220. >62 leshort <2
  1221. >>54 leshort 12345 Bio-Rad .PIC Image File
  1222. >>>0 leshort >0 %d x
  1223. >>>2 leshort >0 %d,
  1224. >>>4 leshort =1 1 image in file
  1225. >>>4 leshort >1 %d images in file
  1226. # From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  1227. # The description of *.mrw format can be found at
  1228. # http://www.dalibor.cz/minolta/raw_file_format.htm
  1229. 0 string \000MRM Minolta Dimage camera raw image data
  1230. # Summary: DjVu image / document
  1231. # Extension: .djvu
  1232. # Reference: http://djvu.org/docs/DjVu3Spec.djvu
  1233. # Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
  1234. # Modified by (1): Abel Cheung <abelcheung@gmail.com>
  1235. 0 string AT&TFORM
  1236. >12 string DJVM DjVu multiple page document
  1237. !:mime image/vnd.djvu
  1238. >12 string DJVU DjVu image or single page document
  1239. !:mime image/vnd.djvu
  1240. >12 string DJVI DjVu shared document
  1241. !:mime image/vnd.djvu
  1242. >12 string THUM DjVu page thumbnails
  1243. !:mime image/vnd.djvu
  1244. # Originally by Marc Espie
  1245. # Modified by Robert Minsk <robertminsk at yahoo.com>
  1246. # https://www.openexr.com/openexrfilelayout.pdf
  1247. 0 lelong 20000630 OpenEXR image data,
  1248. !:mime image/x-exr
  1249. >4 lelong&0x000000ff x version %d,
  1250. >4 lelong ^0x00000200 storage: scanline
  1251. >4 lelong &0x00000200 storage: tiled
  1252. >8 search/0x1000 compression\0 \b, compression:
  1253. >>&16 byte 0 none
  1254. >>&16 byte 1 rle
  1255. >>&16 byte 2 zips
  1256. >>&16 byte 3 zip
  1257. >>&16 byte 4 piz
  1258. >>&16 byte 5 pxr24
  1259. >>&16 byte 6 b44
  1260. >>&16 byte 7 b44a
  1261. >>&16 byte 8 dwaa
  1262. >>&16 byte 9 dwab
  1263. >>&16 byte >9 unknown
  1264. >8 search/0x1000 dataWindow\0 \b, dataWindow:
  1265. >>&10 lelong x (%d
  1266. >>&14 lelong x %d)-
  1267. >>&18 lelong x \b(%d
  1268. >>&22 lelong x %d)
  1269. >8 search/0x1000 displayWindow\0 \b, displayWindow:
  1270. >>&10 lelong x (%d
  1271. >>&14 lelong x %d)-
  1272. >>&18 lelong x \b(%d
  1273. >>&22 lelong x %d)
  1274. >8 search/0x1000 lineOrder\0 \b, lineOrder:
  1275. >>&14 byte 0 increasing y
  1276. >>&14 byte 1 decreasing y
  1277. >>&14 byte 2 random y
  1278. >>&14 byte >2 unknown
  1279. # SMPTE Digital Picture Exchange Format, SMPTE DPX
  1280. #
  1281. # ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
  1282. # Moving-Picture Exchange (DPX), v1.0, 18 February 1994
  1283. # Robert Minsk <robertminsk at yahoo.com>
  1284. # Modified by Harry Mallon <hjmallon at gmail.com>
  1285. 0 string SDPX DPX image data, big-endian,
  1286. !:mime image/x-dpx
  1287. >0 use dpx_info
  1288. 0 string XPDS DPX image data, little-endian,
  1289. !:mime image/x-dpx
  1290. >0 use \^dpx_info
  1291. 0 name dpx_info
  1292. >768 beshort <4
  1293. >>772 belong x %dx
  1294. >>776 belong x \b%d,
  1295. >768 beshort >3
  1296. >>776 belong x %dx
  1297. >>772 belong x \b%d,
  1298. >768 beshort 0 left to right/top to bottom
  1299. >768 beshort 1 right to left/top to bottom
  1300. >768 beshort 2 left to right/bottom to top
  1301. >768 beshort 3 right to left/bottom to top
  1302. >768 beshort 4 top to bottom/left to right
  1303. >768 beshort 5 top to bottom/right to left
  1304. >768 beshort 6 bottom to top/left to right
  1305. >768 beshort 7 bottom to top/right to left
  1306. # From: Tom Hilinski <tom.hilinski@comcast.net>
  1307. # https://www.unidata.ucar.edu/packages/netcdf/
  1308. 0 string CDF\001 NetCDF Data Format data
  1309. # 64-bit offset netcdf Classic https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications
  1310. 0 string CDF\002 NetCDF Data Format data (64-bit offset)
  1311. #-----------------------------------------------------------------------
  1312. # Hierarchical Data Format, used to facilitate scientific data exchange
  1313. # specifications at http://hdf.ncsa.uiuc.edu/
  1314. 0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  1315. !:mime application/x-hdf
  1316. 0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data
  1317. !:mime application/x-hdf
  1318. 512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block
  1319. !:mime application/x-hdf
  1320. 1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block
  1321. !:mime application/x-hdf
  1322. 2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block
  1323. !:mime application/x-hdf
  1324. 4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block
  1325. !:mime application/x-hdf
  1326. # From: Tobias Burnus <burnus@net-b.de>
  1327. # Xara (for a while: Corel Xara) is a graphic package, see
  1328. # http://www.xara.com/ for Windows and as GPL application for Linux
  1329. 0 string XARA\243\243 Xara graphics file
  1330. # https://www.cartesianinc.com/Tech/
  1331. 0 string CPC\262 Cartesian Perceptual Compression image
  1332. !:mime image/x-cpi
  1333. # From Albert Cahalan <acahalan@gmail.com>
  1334. # puredigital used it for the CVS disposable camcorder
  1335. #8 lelong 4 ZBM bitmap image data
  1336. #>4 leshort x %u x
  1337. #>6 leshort x %u
  1338. # From Albert Cahalan <acahalan@gmail.com>
  1339. # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
  1340. 0 string C565 OLPC firmware icon image data
  1341. >4 leshort x %u x
  1342. >6 leshort x %u
  1343. # Applied Images - Image files from Cytovision
  1344. # Gustavo Junior Alves <gjalves@gjalves.com.br>
  1345. 0 string \xce\xda\xde\xfa Cytovision Metaphases file
  1346. 0 string \xed\xad\xef\xac Cytovision Karyotype file
  1347. 0 string \x0b\x00\x03\x00 Cytovision FISH Probe file
  1348. 0 string \xed\xfe\xda\xbe Cytovision FLEX file
  1349. 0 string \xed\xab\xed\xfe Cytovision FLEX file
  1350. 0 string \xad\xfd\xea\xad Cytovision RATS file
  1351. # Wavelet Scalar Quantization format used in gray-scale fingerprint images
  1352. # From Tano M Fotang <mfotang@quanteq.com>
  1353. 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data
  1354. # Type: PCO B16 image files
  1355. # URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf
  1356. # From: Florian Philipp <florian.philipp@binarywings.net>
  1357. # Extension: .b16
  1358. # Description: Pixel image format produced by PCO Camware, typically used
  1359. # together with PCO cameras.
  1360. # Note: Different versions exist for e.g. 8 bit and 16 bit images.
  1361. # Documentation is incomplete.
  1362. 0 string/b PCO- PCO B16 image data
  1363. >12 lelong x \b, %dx
  1364. >16 lelong x \b%d
  1365. >20 lelong 0 \b, short header
  1366. >20 lelong -1 \b, extended header
  1367. >>24 lelong 0 \b, grayscale
  1368. >>>36 lelong 0 linear LUT
  1369. >>>36 lelong 1 logarithmic LUT
  1370. >>>28 lelong x [%d
  1371. >>>32 lelong x \b,%d]
  1372. >>24 lelong 1 \b, color
  1373. >>>64 lelong 0 linear LUT
  1374. >>>64 lelong 1 logarithmic LUT
  1375. >>>40 lelong x r[%d
  1376. >>>44 lelong x \b,%d]
  1377. >>>48 lelong x g[%d
  1378. >>>52 lelong x \b,%d]
  1379. >>>56 lelong x b[%d
  1380. >>>60 lelong x \b,%d]
  1381. # Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches
  1382. # From: Markus Heidelberg <markus.heidelberg at web.de>
  1383. 0 string/t [BitmapInfo2] Polar Monitor Bitmap text
  1384. !:mime image/x-polar-monitor-bitmap
  1385. # From: Rick Richardson <rickrich@gmail.com>
  1386. # updated by: Joerg Jenderek
  1387. # URL: http://techmods.net/nuvi/
  1388. 0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file
  1389. # extension is also used for
  1390. # Sony SRF raw image (image/x-sony-srf)
  1391. # SRF map
  1392. # Terragen Surface Map (https://www.planetside.co.uk/terragen)
  1393. # FileLocator Pro search criteria file (https://www.mythicsoft.com/filelocatorpro)
  1394. !:ext srf
  1395. #!:mime image/x-garmin-srf
  1396. # version 1.00,2.00,2.10,2.40,2.50
  1397. >0x2f string >0 \b, version %4.4s
  1398. # width (2880,2881,3240)
  1399. >0x55 uleshort >0 \b, %dx
  1400. # height (80,90)
  1401. >>0x53 uleshort x \b%d
  1402. # Type: Ulead Photo Explorer5 (.pe5)
  1403. # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
  1404. # From: Simon Horman <horms@debian.org>
  1405. 0 string IIO2H Ulead Photo Explorer5
  1406. # Type: X11 cursor
  1407. # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
  1408. # From: Mathias Brodala <info@noctus.net>
  1409. 0 string Xcur X11 cursor
  1410. # Type: Olympus ORF raw images.
  1411. # URL: https://libopenraw.freedesktop.org/wiki/Olympus_ORF
  1412. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1413. 0 string MMOR Olympus ORF raw image data, big-endian
  1414. !:mime image/x-olympus-orf
  1415. 0 string IIRO Olympus ORF raw image data, little-endian
  1416. !:mime image/x-olympus-orf
  1417. 0 string IIRS Olympus ORF raw image data, little-endian
  1418. !:mime image/x-olympus-orf
  1419. # Type: files used in modern AVCHD camcoders to store clip information
  1420. # Extension: .cpi
  1421. # From: Alexander Danilov <alexander.a.danilov@gmail.com>
  1422. 0 string HDMV0100 AVCHD Clip Information
  1423. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1424. # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
  1425. # Radiance HDR; usually has .pic or .hdr extension.
  1426. 0 string #?RADIANCE\n Radiance HDR image data
  1427. #!mime image/vnd.radiance
  1428. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1429. # URL: https://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
  1430. # Used by the pfstools packages. The regex matches for the image size could
  1431. # probably use some work. The MIME type is made up; if there's one in
  1432. # actual common use, it should replace the one below.
  1433. 0 string PFS1\x0a PFS HDR image data
  1434. #!mime image/x-pfs
  1435. >1 regex [0-9]*\ \b, %s
  1436. >>1 regex \ [0-9]{4} \bx%s
  1437. # Type: Foveon X3F
  1438. # URL: https://www.photofo.com/downloads/x3f-raw-format.pdf
  1439. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1440. # Note that the MIME type isn't defined anywhere that I can find; if
  1441. # there's a canonical type for this format, it should replace this one.
  1442. 0 string FOVb Foveon X3F raw image data
  1443. !:mime image/x-x3f
  1444. >6 leshort x \b, version %d.
  1445. >4 leshort x \b%d
  1446. >28 lelong x \b, %dx
  1447. >32 lelong x \b%d
  1448. # Paint.NET file
  1449. # From Adam Buchbinder <adam.buchbinder@gmail.com>
  1450. 0 string PDN3 Paint.NET image data
  1451. !:mime image/x-paintnet
  1452. # Not really an image.
  1453. # From: "Tano M. Fotang" <mfotang@quanteq.com>
  1454. 0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR)
  1455. # doc: https://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip
  1456. # example: https://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip
  1457. 90 bequad 0x574D50484F544F00 JPEG-XR Image
  1458. >98 byte&0x08 =0x08 \b, hard tiling
  1459. >99 byte&0x80 =0x80 \b, tiling present
  1460. >99 byte&0x40 =0x40 \b, codestream present
  1461. >99 byte&0x38 x \b, spatial xform=
  1462. >99 byte&0x38 0x00 \bTL
  1463. >99 byte&0x38 0x08 \bBL
  1464. >99 byte&0x38 0x10 \bTR
  1465. >99 byte&0x38 0x18 \bBR
  1466. >99 byte&0x38 0x20 \bBT
  1467. >99 byte&0x38 0x28 \bRB
  1468. >99 byte&0x38 0x30 \bLT
  1469. >99 byte&0x38 0x38 \bLB
  1470. >100 byte&0x80 =0x80 \b, short header
  1471. >>102 beshort+1 x \b, %d
  1472. >>104 beshort+1 x \bx%d
  1473. >100 byte&0x80 =0x00 \b, long header
  1474. >>102 belong+1 x \b, %x
  1475. >>106 belong+1 x \bx%x
  1476. >101 beshort&0xf x \b, bitdepth=
  1477. >>101 beshort&0xf 0x0 \b1-WHITE=1
  1478. >>101 beshort&0xf 0x1 \b8
  1479. >>101 beshort&0xf 0x2 \b16
  1480. >>101 beshort&0xf 0x3 \b16-SIGNED
  1481. >>101 beshort&0xf 0x4 \b16-FLOAT
  1482. >>101 beshort&0xf 0x5 \b(reserved 5)
  1483. >>101 beshort&0xf 0x6 \b32-SIGNED
  1484. >>101 beshort&0xf 0x7 \b32-FLOAT
  1485. >>101 beshort&0xf 0x8 \b5
  1486. >>101 beshort&0xf 0x9 \b10
  1487. >>101 beshort&0xf 0xa \b5-6-5
  1488. >>101 beshort&0xf 0xb \b(reserved %d)
  1489. >>101 beshort&0xf 0xc \b(reserved %d)
  1490. >>101 beshort&0xf 0xd \b(reserved %d)
  1491. >>101 beshort&0xf 0xe \b(reserved %d)
  1492. >>101 beshort&0xf 0xf \b1-BLACK=1
  1493. >101 beshort&0xf0 x \b, colorfmt=
  1494. >>101 beshort&0xf0 0x00 \bYONLY
  1495. >>101 beshort&0xf0 0x10 \bYUV240
  1496. >>101 beshort&0xf0 0x20 \bYWV422
  1497. >>101 beshort&0xf0 0x30 \bYWV444
  1498. >>101 beshort&0xf0 0x40 \bCMYK
  1499. >>101 beshort&0xf0 0x50 \bCMYKDIRECT
  1500. >>101 beshort&0xf0 0x60 \bNCOMPONENT
  1501. >>101 beshort&0xf0 0x70 \bRGB
  1502. >>101 beshort&0xf0 0x80 \bRGBE
  1503. >>101 beshort&0xf0 >0x80 \b(reserved 0x%x)
  1504. # From: Johan van der Knijff <johan.vanderknijff@kb.nl>
  1505. #
  1506. # BPG (Better Portable Graphics) format
  1507. # https://bellard.org/bpg/
  1508. # http://fileformats.archiveteam.org/wiki/BPG
  1509. #
  1510. 0 string \x42\x50\x47\xFB BPG (Better Portable Graphics)
  1511. !:mime image/bpg
  1512. # From: Joerg Jenderek
  1513. # URL: https://en.wikipedia.org/wiki/Apple_Icon_Image_format
  1514. 0 string icns Mac OS X icon
  1515. !:mime image/x-icns
  1516. !:apple ????icns
  1517. !:ext icns
  1518. >4 ubelong >0
  1519. # file size
  1520. >>4 ubelong x \b, %d bytes
  1521. # icon type
  1522. >>8 string x \b, "%4.4s" type
  1523. # TIM images
  1524. 0 lelong 0x00000010 TIM image,
  1525. >4 lelong 0x8 4-Bit,
  1526. >4 lelong 0x9 8-Bit,
  1527. >4 lelong 0x2 15-Bit,
  1528. >4 lelong 0x3 24-Bit,
  1529. >4 lelong &8
  1530. >>(8.l+12) leshort x Pixel at (%d,
  1531. >>(8.l+14) leshort x \b%d)
  1532. >>(8.l+16) leshort x Size=%dx
  1533. >>(8.l+18) leshort x \b%d,
  1534. >>4 lelong 0x8 16 CLUT Entries at
  1535. >>4 lelong 0x9 256 CLUT Entries at
  1536. >>12 leshort x (%d,
  1537. >>14 leshort x \b%d)
  1538. >4 lelong ^8
  1539. >>12 leshort x Pixel at (%d,
  1540. >>14 leshort x \b%d)
  1541. >>16 leshort x Size=%dx
  1542. >>18 leshort x \b%d
  1543. # MDEC streams
  1544. 0 lelong 0x80010160 MDEC video stream,
  1545. >16 leshort x %dx
  1546. >18 leshort x \b%d
  1547. #>8 lelong x %d frames
  1548. #>4 leshort x secCount=%d;
  1549. #>6 leshort x nSectors=%d;
  1550. #>12 lelong x frameSize=%d;
  1551. # BS encoded bitstreams
  1552. 2 leshort 0x3800 BS image,
  1553. >6 leshort x Version %d,
  1554. >4 leshort x Quantization %d,
  1555. >0 leshort x (Decompresses to %d words)
  1556. # Type: farbfeld image.
  1557. # Url: http://tools.suckless.org/farbfeld/
  1558. # From: Ian D. Scott <ian@iandouglasscott.com>
  1559. #
  1560. 0 string farbfeld farbfeld image data,
  1561. >8 ubelong x %dx
  1562. >12 ubelong x \b%d
  1563. # Type: Microsoft DirectDraw Surface (common data)
  1564. # URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  1565. # From: Morten Hustveit <morten@debian.org>
  1566. # Updated by: David Korth <gerbilsoft@gerbilsoft.com>
  1567. 0 name ms-directdraw-surface
  1568. >0x10 ulelong x %u x
  1569. >0x0C ulelong x %u
  1570. # Color depth.
  1571. >0x58 ulelong >0 \b, %u-bit color
  1572. # Determine the pixel format.
  1573. >0x50 ulelong&0x4 4
  1574. # FIXME: Handle DX10 and XBOX formats.
  1575. >>0x54 string x \b, compressed using %.4s
  1576. >0x50 ulelong&0x2 0x2 \b, alpha only
  1577. >0x50 ulelong&0x200 0x200 \b, YUV
  1578. >0x50 ulelong&0x20000 0x20000 \b, luminance
  1579. # RGB pixel format
  1580. >0x50 ulelong&0x40 0x40
  1581. # Determine the RGB format using the color masks.
  1582. # ulequad order: 0xGGGGGGGGRRRRRRRR, 0xAAAAAAAABBBBBBBB
  1583. >>0x58 ulelong 16
  1584. # NOTE: 15-bit color formats usually have 16-bit listed as the color depth.
  1585. >>>0x5C ulequad 0x000003E000007C00
  1586. >>>>0x64 ulequad 0x000000000000001F \b, RGB555
  1587. >>>0x5C ulequad 0x000003E000001F00
  1588. >>>>0x64 ulequad 0x000000000000007C \b, BGR555
  1589. >>>0x5C ulequad 0x000007E00000F800
  1590. >>>>0x64 ulequad 0x000000000000001F \b, RGB565
  1591. >>>0x5C ulequad 0x000007E000001F00
  1592. >>>>0x64 ulequad 0x00000000000000F8 \b, BGR565
  1593. >>>0x5C ulequad 0x000000F000000F00
  1594. >>>>0x64 ulequad 0x0000F0000000000F \b, ARGB4444
  1595. >>>0x5C ulequad 0x000000F00000000F
  1596. >>>>0x64 ulequad 0x0000F00000000F00 \b, ABGR4444
  1597. >>>0x5C ulequad 0x00000F000000F000
  1598. >>>>0x64 ulequad 0x0000000F000000F0 \b, RGBA4444
  1599. >>>0x5C ulequad 0x00000F00000000F0
  1600. >>>>0x64 ulequad 0x0000000F0000F000 \b, BGRA4444
  1601. >>>0x5C ulequad 0x000000F000000F00
  1602. >>>>0x64 ulequad 0x000000000000000F \b, xRGB4444
  1603. >>>0x5C ulequad 0x000000F00000000F
  1604. >>>>0x64 ulequad 0x0000000000000F00 \b, xBGR4444
  1605. >>>0x5C ulequad 0x00000F000000F000
  1606. >>>>0x64 ulequad 0x00000000000000F0 \b, RGBx4444
  1607. >>>0x5C ulequad 0x00000F00000000F0
  1608. >>>>0x64 ulequad 0x000000000000F000 \b, BGRx4444
  1609. >>>0x5C ulequad 0x000003E000007C00
  1610. >>>>0x64 ulequad 0x000080000000001F \b, ARGB1555
  1611. >>>0x5C ulequad 0x000003E000001F00
  1612. >>>>0x64 ulequad 0x000080000000007C \b, ABGR1555
  1613. >>>0x5C ulequad 0x000007C00000F800
  1614. >>>>0x64 ulequad 0x000000010000003E \b, RGBA5551
  1615. >>>0x5C ulequad 0x000007C00000003E
  1616. >>>>0x64 ulequad 0x000000010000F800 \b, BGRA5551
  1617. >>88 ulelong 24
  1618. >>>0x5C ulequad 0x0000FF0000FF0000
  1619. >>>>0x64 ulequad 0x00000000000000FF \b, RGB888
  1620. >>>0x5C ulequad 0x0000FF00000000FF
  1621. >>>>0x64 ulequad 0x0000000000FF0000 \b, BGR888
  1622. >>88 ulelong 32
  1623. >>>0x5C ulequad 0x0000FF0000FF0000
  1624. >>>>0x64 ulequad 0xFF000000000000FF \b, ARGB8888
  1625. >>>0x5C ulequad 0x0000FF00000000FF
  1626. >>>>0x64 ulequad 0xFF00000000FF0000 \b, ABGR8888
  1627. >>>0x5C ulequad 0x00FF0000FF000000
  1628. >>>>0x64 ulequad 0x000000FF0000FF00 \b, RGBA8888
  1629. >>>0x5C ulequad 0x00FF00000000FF00
  1630. >>>>0x64 ulequad 0x000000FFFF000000 \b, BGBA8888
  1631. >>>0x5C ulequad 0x0000FF0000FF0000
  1632. >>>>0x64 ulequad 0x00000000000000FF \b, xRGB8888
  1633. >>>0x5C ulequad 0x0000FF00000000FF
  1634. >>>>0x64 ulequad 0x0000000000FF0000 \b, xBGR8888
  1635. >>>0x5C ulequad 0x00FF0000FF000000
  1636. >>>>0x64 ulequad 0x000000000000FF00 \b, RGBx8888
  1637. >>>0x5C ulequad 0x00FF00000000FF00
  1638. >>>>0x64 ulequad 0x00000000FF000000 \b, BGBx8888
  1639. # Less common 32-bit color formats.
  1640. >>>0x5C ulequad 0xFFFF00000000FFFF
  1641. >>>>0x64 ulequad 0x0000000000000000 \b, G16R16
  1642. >>>0x5C ulequad 0x0000FFFFFFFF0000
  1643. >>>>0x64 ulequad 0x0000000000000000 \b, R16G16
  1644. >>>0x5C ulequad 0x000FFC003FF00000
  1645. >>>>0x64 ulequad 0xC0000000000003FF \b, A2R10G10B10
  1646. >>>0x5C ulequad 0x000FFC00000003FF
  1647. >>>>0x64 ulequad 0xC00000003FF00000 \b, A2B10G10R10
  1648. # Type: Microsoft DirectDraw Surface
  1649. # URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  1650. # From: Morten Hustveit <morten@debian.org>
  1651. # Updated by: David Korth <gerbilsoft@gerbilsoft.com>
  1652. 0 string/b DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS):
  1653. >0 use ms-directdraw-surface
  1654. # Type: Sega PVR image.
  1655. # From: David Korth <gerbilsoft@gerbilsoft.com>
  1656. # References:
  1657. # - https://fabiensanglard.net/Mykaruga/tools/segaPVRFormat.txt
  1658. # - https://github.com/yazgoo/pvrx2png
  1659. # - https://github.com/nickworonekin/puyotools
  1660. # Sega PVR header.
  1661. 0 name sega-pvr-image-header
  1662. >0x0C leshort x %u x
  1663. >0x0E leshort x %u
  1664. # Image format.
  1665. >0x08 byte 0 \b, ARGB1555
  1666. >0x08 byte 1 \b, RGB565
  1667. >0x08 byte 2 \b, ARGB4444
  1668. >0x08 byte 3 \b, YUV442
  1669. >0x08 byte 4 \b, Bump
  1670. >0x08 byte 5 \b, 4bpp
  1671. >0x08 byte 6 \b, 8bpp
  1672. # Image data type.
  1673. >0x09 byte 0x01 \b, square twiddled
  1674. >0x09 byte 0x02 \b, square twiddled & mipmap
  1675. >0x09 byte 0x03 \b, VQ
  1676. >0x09 byte 0x04 \b, VQ & mipmap
  1677. >0x09 byte 0x05 \b, 8-bit CLUT twiddled
  1678. >0x09 byte 0x06 \b, 4-bit CLUT twiddled
  1679. >0x09 byte 0x07 \b, 8-bit direct twiddled
  1680. >0x09 byte 0x08 \b, 4-bit direct twiddled
  1681. >0x09 byte 0x09 \b, rectangle
  1682. >0x09 byte 0x0B \b, rectangular stride
  1683. >0x09 byte 0x0D \b, rectangular twiddled
  1684. >0x09 byte 0x10 \b, small VQ
  1685. >0x09 byte 0x11 \b, small VQ & mipmap
  1686. >0x09 byte 0x12 \b, square twiddled & mipmap
  1687. # Sega PVR image.
  1688. 0 string PVRT
  1689. >0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image:
  1690. >>0x20 use ms-directdraw-surface
  1691. >0x10 belong !0x44445320 Sega PVR image:
  1692. >>0 use sega-pvr-image-header
  1693. # Sega PVR image with GBIX.
  1694. 0 string GBIX
  1695. >0x10 string PVRT
  1696. >>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image:
  1697. >>>0x20 use ms-directdraw-surface
  1698. >>0x10 belong !0x44445320 Sega PVR image:
  1699. >>>0x10 use sega-pvr-image-header
  1700. >>0x08 lelong x \b, global index = %u
  1701. # Sega GVR header.
  1702. 0 name sega-gvr-image-header
  1703. >0x0C beshort x %u x
  1704. >0x0E beshort x %u
  1705. # Image data format.
  1706. >0x0B byte 0 \b, I4
  1707. >0x0B byte 1 \b, I8
  1708. >0x0B byte 2 \b, IA4
  1709. >0x0B byte 3 \b, IA8
  1710. >0x0B byte 4 \b, RGB565
  1711. >0x0B byte 5 \b, RGB5A3
  1712. >0x0B byte 6 \b, ARGB8888
  1713. >0x0B byte 8 \b, CI4
  1714. >0x0B byte 9 \b, CI8
  1715. >0x0B byte 14 \b, DXT1
  1716. # Sega GVR image.
  1717. 0 string GVRT Sega GVR image:
  1718. >0x10 use sega-gvr-image-header
  1719. # Sega GVR image with GBIX.
  1720. 0 string GBIX
  1721. >0x10 string GVRT Sega GVR image:
  1722. >>0x10 use sega-gvr-image-header
  1723. >>0x08 belong x \b, global index = %u
  1724. # Sega GVR image with GCIX. (Wii)
  1725. 0 string GCIX
  1726. >0x10 string GVRT Sega GVR image:
  1727. >>0x10 use sega-gvr-image-header
  1728. >>0x08 belong x \b, global index = %u
  1729. # Light Field Picture
  1730. # Documentation: http://optics.miloush.net/lytro/TheFileFormat.aspx
  1731. # Typical file extensions: .lfp .lfr .lfx
  1732. 0 belong 0x894C4650
  1733. >4 belong 0x0D0A1A0A
  1734. >12 belong 0x00000000 Lytro Light Field Picture
  1735. >8 belong x \b, version %d
  1736. # Type: Vision Research Phantom CINE Format
  1737. # URL: https://www.phantomhighspeed.com/
  1738. # URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk
  1739. # From: Harry Mallon <hjmallon at gmail.com>
  1740. #
  1741. # This has a short "CI" code but the 44 is the size of the struct which is
  1742. # stable
  1743. 0 string CI
  1744. >2 leshort 44 Vision Research CINE Video,
  1745. >>4 leshort 0 Grayscale,
  1746. >>4 leshort 1 JPEG Compressed,
  1747. >>4 leshort 2 RAW,
  1748. >>6 leshort x version %d,
  1749. >>20 lelong x %d frames,
  1750. >>48 lelong x %dx
  1751. >>52 lelong x \b%d
  1752. # Type: ARRI Raw Image
  1753. # Info: SMPTE RDD30:2014
  1754. # From: Harry Mallon <hjmallon at gmail.com>
  1755. 0 string ARRI ARRI ARI image data,
  1756. >4 lelong 0x78563412 little-endian,
  1757. >4 lelong 0x12345678 big-endian,
  1758. >12 lelong x version %d,
  1759. >20 lelong x %dx
  1760. >24 lelong x \b%d
  1761. # Type: Khronos KTX texture.
  1762. # From: David Korth <gerbilsoft@gerbilsoft.com>
  1763. # Reference: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
  1764. # glEnum decoding.
  1765. # NOTE: Only the most common formats are listed here.
  1766. 0 name khronos-ktx-glEnum
  1767. >0 lelong 0x1907 \b, RGB
  1768. >0 lelong 0x1908 \b, RGBA
  1769. >0 lelong 0x1909 \b, LUMINANCE
  1770. >0 lelong 0x190A \b, LUMINANCE_ALPHA
  1771. >0 lelong 0x80E1 \b, BGR
  1772. >0 lelong 0x80E2 \b, BGRA
  1773. >0 lelong 0x83A0 \b, RGB_S3TC
  1774. >0 lelong 0x83A1 \b, RGB4_S3TC
  1775. >0 lelong 0x83A2 \b, RGBA_S3TC
  1776. >0 lelong 0x83A3 \b, RGBA4_S3TC
  1777. >0 lelong 0x83A4 \b, RGBA_DXT5_S3TC
  1778. >0 lelong 0x83A5 \b, RGBA4_DXT5_S3TC
  1779. >0 lelong 0x83F0 \b, COMPRESSED_RGB_S3TC_DXT1_EXT
  1780. >0 lelong 0x83F1 \b, COMPRESSED_RGBA_S3TC_DXT1_EXT
  1781. >0 lelong 0x83F2 \b, COMPRESSED_RGBA_S3TC_DXT3_EXT
  1782. >0 lelong 0x83F3 \b, COMPRESSED_RGBA_S3TC_DXT5_EXT
  1783. >0 lelong 0x8D64 \b, ETC1_RGB8_OES
  1784. >0 lelong 0x9270 \b, COMPRESSED_R11_EAC
  1785. >0 lelong 0x9271 \b, COMPRESSED_SIGNED_R11_EAC
  1786. >0 lelong 0x9272 \b, COMPRESSED_RG11_EAC
  1787. >0 lelong 0x9273 \b, COMPRESSED_SIGNED_RG11_EAC
  1788. >0 lelong 0x9274 \b, COMPRESSED_RGB8_ETC2
  1789. >0 lelong 0x9275 \b, COMPRESSED_SRGB8_ETC2
  1790. >0 lelong 0x9276 \b, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
  1791. >0 lelong 0x9277 \b, COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
  1792. >0 lelong 0x9278 \b, COMPRESSED_RGBA2_ETC2_EAC
  1793. >0 lelong 0x9279 \b, COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
  1794. >0 lelong 0x93B0 \b, COMPRESSED_RGBA_ASTC_4x4_KHR
  1795. >0 lelong 0x93B1 \b, COMPRESSED_RGBA_ASTC_5x4_KHR
  1796. >0 lelong 0x93B2 \b, COMPRESSED_RGBA_ASTC_5x5_KHR
  1797. >0 lelong 0x93B3 \b, COMPRESSED_RGBA_ASTC_6x5_KHR
  1798. >0 lelong 0x93B4 \b, COMPRESSED_RGBA_ASTC_6x6_KHR
  1799. >0 lelong 0x93B5 \b, COMPRESSED_RGBA_ASTC_8x5_KHR
  1800. >0 lelong 0x93B6 \b, COMPRESSED_RGBA_ASTC_8x6_KHR
  1801. >0 lelong 0x93B7 \b, COMPRESSED_RGBA_ASTC_8x8_KHR
  1802. >0 lelong 0x93B8 \b, COMPRESSED_RGBA_ASTC_10x5_KHR
  1803. >0 lelong 0x93B9 \b, COMPRESSED_RGBA_ASTC_10x6_KHR
  1804. >0 lelong 0x93BA \b, COMPRESSED_RGBA_ASTC_10x8_KHR
  1805. >0 lelong 0x93BB \b, COMPRESSED_RGBA_ASTC_10x10_KHR
  1806. >0 lelong 0x93BC \b, COMPRESSED_RGBA_ASTC_12x10_KHR
  1807. >0 lelong 0x93BD \b, COMPRESSED_RGBA_ASTC_12x12_KHR
  1808. >0 lelong 0x93D0 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
  1809. >0 lelong 0x93D1 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
  1810. >0 lelong 0x93D2 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
  1811. >0 lelong 0x93D3 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
  1812. >0 lelong 0x93D4 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
  1813. >0 lelong 0x93D5 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
  1814. >0 lelong 0x93D6 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
  1815. >0 lelong 0x93D7 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
  1816. >0 lelong 0x93D8 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
  1817. >0 lelong 0x93D9 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
  1818. >0 lelong 0x93DA \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR
  1819. >0 lelong 0x93DB \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
  1820. >0 lelong 0x93DC \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
  1821. >0 lelong 0x93DD \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
  1822. # Endian-specific KTX header.
  1823. # TODO: glType (all textures I've seen so far are GL_UNSIGNED_BYTE)
  1824. 0 name khronos-ktx-endian-header
  1825. >20 lelong x \b, %u
  1826. >24 lelong >1 x %u
  1827. >28 lelong >1 x %u
  1828. >8 lelong >0
  1829. >>8 use khronos-ktx-glEnum
  1830. >8 lelong 0
  1831. >>12 use khronos-ktx-glEnum
  1832. # Main KTX header.
  1833. # Determine endianness, then check the rest of the header.
  1834. 0 string \xABKTX\ 11\xBB\r\n\x1A\n Khronos KTX texture
  1835. >12 lelong 0x04030201 (little-endian)
  1836. >>16 use khronos-ktx-endian-header
  1837. >12 belong 0x04030201 (big-endian)
  1838. >>16 use \^khronos-ktx-endian-header
  1839. # Type: Khronos KTX2 texture.
  1840. # From: David Korth <gerbilsoft@gerbilsoft.com>
  1841. # Based on draft19.
  1842. # Reference: http://github.khronos.org/KTX-Specification/
  1843. # Supercompression enum.
  1844. 0 name khronos-ktx2-supercompression
  1845. >0 lelong 1 Basis Universal
  1846. >0 lelong 2 Zstandard
  1847. # Vulkan format identifier.
  1848. # NOTE: Formats prohibited from KTX2 are commented out.
  1849. 0 name khronos-ktx2-vkFormat
  1850. >0 lelong 0 UNDEFINED
  1851. >0 lelong 1 R4G4_UNORM_PACK8
  1852. >0 lelong 2 R4G4B4A4_UNORM_PACK16
  1853. >0 lelong 3 B4G4R4A4_UNORM_PACK16
  1854. >0 lelong 4 R5G6B5_UNORM_PACK16
  1855. >0 lelong 5 B5G6R5_UNORM_PACK16
  1856. >0 lelong 6 R5G5B5A1_UNORM_PACK16
  1857. >0 lelong 7 B5G5R5A1_UNORM_PACK16
  1858. >0 lelong 8 A1R5G5B5_UNORM_PACK16
  1859. >0 lelong 9 R8_UNORM
  1860. >0 lelong 10 R8_SNORM
  1861. #>0 lelong 11 R8_USCALED
  1862. #>0 lelong 12 R8_SSCALED
  1863. >0 lelong 13 R8_UINT
  1864. >0 lelong 14 R8_SINT
  1865. >0 lelong 15 R8_SRGB
  1866. >0 lelong 16 R8G8_UNORM
  1867. >0 lelong 17 R8G8_SNORM
  1868. #>0 lelong 18 R8G8_USCALED
  1869. #>0 lelong 19 R8G8_SSCALED
  1870. >0 lelong 20 R8G8_UINT
  1871. >0 lelong 21 R8G8_SINT
  1872. >0 lelong 22 R8G8_SRGB
  1873. >0 lelong 23 R8G8B8_UNORM
  1874. >0 lelong 24 R8G8B8_SNORM
  1875. #>0 lelong 25 R8G8B8_USCALED
  1876. #>0 lelong 26 R8G8B8_SSCALED
  1877. >0 lelong 27 R8G8B8_UINT
  1878. >0 lelong 28 R8G8B8_SINT
  1879. >0 lelong 29 R8G8B8_SRGB
  1880. >0 lelong 30 B8G8R8_UNORM
  1881. >0 lelong 31 B8G8R8_SNORM
  1882. #>0 lelong 32 B8G8R8_USCALED
  1883. #>0 lelong 33 B8G8R8_SSCALED
  1884. >0 lelong 34 B8G8R8_UINT
  1885. >0 lelong 35 B8G8R8_SINT
  1886. >0 lelong 36 B8G8R8_SRGB
  1887. >0 lelong 37 R8G8B8A8_UNORM
  1888. >0 lelong 38 R8G8B8A8_SNORM
  1889. #>0 lelong 39 R8G8B8A8_USCALED
  1890. #>0 lelong 40 R8G8B8A8_SSCALED
  1891. >0 lelong 41 R8G8B8A8_UINT
  1892. >0 lelong 42 R8G8B8A8_SINT
  1893. >0 lelong 43 R8G8B8A8_SRGB
  1894. >0 lelong 44 B8G8R8A8_UNORM
  1895. >0 lelong 45 B8G8R8A8_SNORM
  1896. #>0 lelong 46 B8G8R8A8_USCALED
  1897. #>0 lelong 47 B8G8R8A8_SSCALED
  1898. >0 lelong 48 B8G8R8A8_UINT
  1899. >0 lelong 49 B8G8R8A8_SINT
  1900. >0 lelong 50 B8G8R8A8_SRGB
  1901. #>0 lelong 51 A8B8G8R8_UNORM_PACK32
  1902. #>0 lelong 52 A8B8G8R8_SNORM_PACK32
  1903. #>0 lelong 53 A8B8G8R8_USCALED_PACK32
  1904. #>0 lelong 54 A8B8G8R8_SSCALED_PACK32
  1905. #>0 lelong 55 A8B8G8R8_UINT_PACK32
  1906. #>0 lelong 56 A8B8G8R8_SINT_PACK32
  1907. #>0 lelong 57 A8B8G8R8_SRGB_PACK32
  1908. >0 lelong 58 A2R10G10B10_UNORM_PACK32
  1909. >0 lelong 59 A2R10G10B10_SNORM_PACK32
  1910. #>0 lelong 60 A2R10G10B10_USCALED_PACK32
  1911. #>0 lelong 61 A2R10G10B10_SSCALED_PACK32
  1912. >0 lelong 62 A2R10G10B10_UINT_PACK32
  1913. >0 lelong 63 A2R10G10B10_SINT_PACK32
  1914. >0 lelong 64 A2B10G10R10_UNORM_PACK32
  1915. >0 lelong 65 A2B10G10R10_SNORM_PACK32
  1916. #>0 lelong 66 A2B10G10R10_USCALED_PACK32
  1917. #>0 lelong 67 A2B10G10R10_SSCALED_PACK32
  1918. >0 lelong 68 A2B10G10R10_UINT_PACK32
  1919. >0 lelong 69 A2B10G10R10_SINT_PACK32
  1920. >0 lelong 70 R16_UNORM
  1921. >0 lelong 71 R16_SNORM
  1922. #>0 lelong 72 R16_USCALED
  1923. #>0 lelong 73 R16_SSCALED
  1924. >0 lelong 74 R16_UINT
  1925. >0 lelong 75 R16_SINT
  1926. >0 lelong 76 R16_SFLOAT
  1927. >0 lelong 77 R16G16_UNORM
  1928. >0 lelong 78 R16G16_SNORM
  1929. #>0 lelong 79 R16G16_USCALED
  1930. #>0 lelong 80 R16G16_SSCALED
  1931. >0 lelong 81 R16G16_UINT
  1932. >0 lelong 82 R16G16_SINT
  1933. >0 lelong 83 R16G16_SFLOAT
  1934. >0 lelong 84 R16G16B16_UNORM
  1935. >0 lelong 85 R16G16B16_SNORM
  1936. #>0 lelong 86 R16G16B16_USCALED
  1937. #>0 lelong 87 R16G16B16_SSCALED
  1938. >0 lelong 88 R16G16B16_UINT
  1939. >0 lelong 89 R16G16B16_SINT
  1940. >0 lelong 90 R16G16B16_SFLOAT
  1941. >0 lelong 91 R16G16B16A16_UNORM
  1942. >0 lelong 92 R16G16B16A16_SNORM
  1943. #>0 lelong 93 R16G16B16A16_USCALED
  1944. #>0 lelong 94 R16G16B16A16_SSCALED
  1945. >0 lelong 95 R16G16B16A16_UINT
  1946. >0 lelong 96 R16G16B16A16_SINT
  1947. >0 lelong 97 R16G16B16A16_SFLOAT
  1948. >0 lelong 98 R32_UINT
  1949. >0 lelong 99 R32_SINT
  1950. >0 lelong 100 R32_SFLOAT
  1951. >0 lelong 101 R32G32_UINT
  1952. >0 lelong 102 R32G32_SINT
  1953. >0 lelong 103 R32G32_SFLOAT
  1954. >0 lelong 104 R32G32B32_UINT
  1955. >0 lelong 105 R32G32B32_SINT
  1956. >0 lelong 106 R32G32B32_SFLOAT
  1957. >0 lelong 107 R32G32B32A32_UINT
  1958. >0 lelong 108 R32G32B32A32_SINT
  1959. >0 lelong 109 R32G32B32A32_SFLOAT
  1960. >0 lelong 110 R64_UINT
  1961. >0 lelong 111 R64_SINT
  1962. >0 lelong 112 R64_SFLOAT
  1963. >0 lelong 113 R64G64_UINT
  1964. >0 lelong 114 R64G64_SINT
  1965. >0 lelong 115 R64G64_SFLOAT
  1966. >0 lelong 116 R64G64B64_UINT
  1967. >0 lelong 117 R64G64B64_SINT
  1968. >0 lelong 118 R64G64B64_SFLOAT
  1969. >0 lelong 119 R64G64B64A64_UINT
  1970. >0 lelong 120 R64G64B64A64_SINT
  1971. >0 lelong 121 R64G64B64A64_SFLOAT
  1972. >0 lelong 122 B10G11R11_UFLOAT_PACK32
  1973. >0 lelong 123 E5B9G9R9_UFLOAT_PACK32
  1974. >0 lelong 124 D16_UNORM
  1975. >0 lelong 125 X8_D24_UNORM_PACK32
  1976. >0 lelong 126 D32_SFLOAT
  1977. >0 lelong 127 S8_UINT
  1978. >0 lelong 128 D16_UNORM_S8_UINT
  1979. >0 lelong 129 D24_UNORM_S8_UINT
  1980. >0 lelong 130 D32_SFLOAT_S8_UINT
  1981. >0 lelong 131 BC1_RGB_UNORM_BLOCK
  1982. >0 lelong 132 BC1_RGB_SRGB_BLOCK
  1983. >0 lelong 133 BC1_RGBA_UNORM_BLOCK
  1984. >0 lelong 134 BC1_RGBA_SRGB_BLOCK
  1985. >0 lelong 135 BC2_UNORM_BLOCK
  1986. >0 lelong 136 BC2_SRGB_BLOCK
  1987. >0 lelong 137 BC3_UNORM_BLOCK
  1988. >0 lelong 138 BC3_SRGB_BLOCK
  1989. >0 lelong 139 BC4_UNORM_BLOCK
  1990. >0 lelong 140 BC4_SNORM_BLOCK
  1991. >0 lelong 141 BC5_UNORM_BLOCK
  1992. >0 lelong 142 BC5_SNORM_BLOCK
  1993. >0 lelong 143 BC6H_UFLOAT_BLOCK
  1994. >0 lelong 144 BC6H_SFLOAT_BLOCK
  1995. >0 lelong 145 BC7_UNORM_BLOCK
  1996. >0 lelong 146 BC7_SRGB_BLOCK
  1997. >0 lelong 147 ETC2_R8G8B8_UNORM_BLOCK
  1998. >0 lelong 148 ETC2_R8G8B8_SRGB_BLOCK
  1999. >0 lelong 149 ETC2_R8G8B8A1_UNORM_BLOCK
  2000. >0 lelong 150 ETC2_R8G8B8A1_SRGB_BLOCK
  2001. >0 lelong 151 ETC2_R8G8B8A8_UNORM_BLOCK
  2002. >0 lelong 152 ETC2_R8G8B8A8_SRGB_BLOCK
  2003. >0 lelong 153 EAC_R11_UNORM_BLOCK
  2004. >0 lelong 154 EAC_R11_SNORM_BLOCK
  2005. >0 lelong 155 EAC_R11G11_UNORM_BLOCK
  2006. >0 lelong 156 EAC_R11G11_SNORM_BLOCK
  2007. >0 lelong 157 ASTC_4x4_UNORM_BLOCK
  2008. >0 lelong 158 ASTC_4x4_SRGB_BLOCK
  2009. >0 lelong 159 ASTC_5x4_UNORM_BLOCK
  2010. >0 lelong 160 ASTC_5x4_SRGB_BLOCK
  2011. >0 lelong 161 ASTC_5x5_UNORM_BLOCK
  2012. >0 lelong 162 ASTC_5x5_SRGB_BLOCK
  2013. >0 lelong 163 ASTC_6x5_UNORM_BLOCK
  2014. >0 lelong 164 ASTC_6x5_SRGB_BLOCK
  2015. >0 lelong 165 ASTC_6x6_UNORM_BLOCK
  2016. >0 lelong 166 ASTC_6x6_SRGB_BLOCK
  2017. >0 lelong 167 ASTC_8x5_UNORM_BLOCK
  2018. >0 lelong 168 ASTC_8x5_SRGB_BLOCK
  2019. >0 lelong 169 ASTC_8x6_UNORM_BLOCK
  2020. >0 lelong 170 ASTC_8x6_SRGB_BLOCK
  2021. >0 lelong 171 ASTC_8x8_UNORM_BLOCK
  2022. >0 lelong 172 ASTC_8x8_SRGB_BLOCK
  2023. >0 lelong 173 ASTC_10x5_UNORM_BLOCK
  2024. >0 lelong 174 ASTC_10x5_SRGB_BLOCK
  2025. >0 lelong 175 ASTC_10x6_UNORM_BLOCK
  2026. >0 lelong 176 ASTC_10x6_SRGB_BLOCK
  2027. >0 lelong 177 ASTC_10x8_UNORM_BLOCK
  2028. >0 lelong 178 ASTC_10x8_SRGB_BLOCK
  2029. >0 lelong 179 ASTC_10x10_UNORM_BLOCK
  2030. >0 lelong 180 ASTC_10x10_SRGB_BLOCK
  2031. >0 lelong 181 ASTC_12x10_UNORM_BLOCK
  2032. >0 lelong 182 ASTC_12x10_SRGB_BLOCK
  2033. >0 lelong 183 ASTC_12x12_UNORM_BLOCK
  2034. >0 lelong 184 ASTC_12x12_SRGB_BLOCK
  2035. >0 lelong 1000156000 G8B8G8R8_422_UNORM
  2036. >0 lelong 1000156001 B8G8R8G8_422_UNORM
  2037. >0 lelong 1000156002 G8_B8_R8_3PLANE_420_UNORM
  2038. >0 lelong 1000156003 G8_B8R8_2PLANE_420_UNORM
  2039. >0 lelong 1000156004 G8_B8_R8_3PLANE_422_UNORM
  2040. >0 lelong 1000156005 G8_B8R8_2PLANE_422_UNORM
  2041. >0 lelong 1000156006 G8_B8_R8_3PLANE_444_UNORM
  2042. >0 lelong 1000156007 R10X6_UNORM_PACK16
  2043. >0 lelong 1000156008 R10X6G10X6_UNORM_2PACK16
  2044. >0 lelong 1000156009 R10X6G10X6B10X6A10X6_UNORM_4PACK16
  2045. >0 lelong 1000156010 G10X6B10X6G10X6R10X6_422_UNORM_4PACK16
  2046. >0 lelong 1000156011 B10X6G10X6R10X6G10X6_422_UNORM_4PACK16
  2047. >0 lelong 1000156012 G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16
  2048. >0 lelong 1000156013 G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
  2049. >0 lelong 1000156014 G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16
  2050. >0 lelong 1000156015 G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16
  2051. >0 lelong 1000156016 G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16
  2052. >0 lelong 1000156017 R12X4_UNORM_PACK16
  2053. >0 lelong 1000156018 R12X4G12X4_UNORM_2PACK16
  2054. >0 lelong 1000156019 R12X4G12X4B12X4A12X4_UNORM_4PACK16
  2055. >0 lelong 1000156020 G12X4B12X4G12X4R12X4_422_UNORM_4PACK16
  2056. >0 lelong 1000156021 B12X4G12X4R12X4G12X4_422_UNORM_4PACK16
  2057. >0 lelong 1000156022 G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16
  2058. >0 lelong 1000156023 G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16
  2059. >0 lelong 1000156024 G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16
  2060. >0 lelong 1000156025 G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16
  2061. >0 lelong 1000156026 G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16
  2062. >0 lelong 1000156027 G16B16G16R16_422_UNORM
  2063. >0 lelong 1000156028 B16G16R16G16_422_UNORM
  2064. >0 lelong 1000156029 G16_B16_R16_3PLANE_420_UNORM
  2065. >0 lelong 1000156030 G16_B16R16_2PLANE_420_UNORM
  2066. >0 lelong 1000156031 G16_B16_R16_3PLANE_422_UNORM
  2067. >0 lelong 1000156032 G16_B16R16_2PLANE_422_UNORM
  2068. >0 lelong 1000156033 G16_B16_R16_3PLANE_444_UNORM
  2069. >0 lelong 1000054000 PVRTC1_2BPP_UNORM_BLOCK_IMG
  2070. >0 lelong 1000054001 PVRTC1_4BPP_UNORM_BLOCK_IMG
  2071. >0 lelong 1000054002 PVRTC2_2BPP_UNORM_BLOCK_IMG
  2072. >0 lelong 1000054003 PVRTC2_4BPP_UNORM_BLOCK_IMG
  2073. >0 lelong 1000054004 PVRTC1_2BPP_SRGB_BLOCK_IMG
  2074. >0 lelong 1000054005 PVRTC1_4BPP_SRGB_BLOCK_IMG
  2075. >0 lelong 1000054006 PVRTC2_2BPP_SRGB_BLOCK_IMG
  2076. >0 lelong 1000054007 PVRTC2_4BPP_SRGB_BLOCK_IMG
  2077. >0 lelong 1000066000 ASTC_4x4_SFLOAT_BLOCK_EXT
  2078. >0 lelong 1000066001 ASTC_5x4_SFLOAT_BLOCK_EXT
  2079. >0 lelong 1000066002 ASTC_5x5_SFLOAT_BLOCK_EXT
  2080. >0 lelong 1000066003 ASTC_6x5_SFLOAT_BLOCK_EXT
  2081. >0 lelong 1000066004 ASTC_6x6_SFLOAT_BLOCK_EXT
  2082. >0 lelong 1000066005 ASTC_8x5_SFLOAT_BLOCK_EXT
  2083. >0 lelong 1000066006 ASTC_8x6_SFLOAT_BLOCK_EXT
  2084. >0 lelong 1000066007 ASTC_8x8_SFLOAT_BLOCK_EXT
  2085. >0 lelong 1000066008 ASTC_10x5_SFLOAT_BLOCK_EXT
  2086. >0 lelong 1000066009 ASTC_10x6_SFLOAT_BLOCK_EXT
  2087. >0 lelong 1000066010 ASTC_10x8_SFLOAT_BLOCK_EXT
  2088. >0 lelong 1000066011 ASTC_10x10_SFLOAT_BLOCK_EXT
  2089. >0 lelong 1000066012 ASTC_12x10_SFLOAT_BLOCK_EXT
  2090. >0 lelong 1000066013 ASTC_12x12_SFLOAT_BLOCK_EXT
  2091. # Main KTX2 header.
  2092. 0 string \xABKTX\ 20\xBB\r\n\x1A\n Khronos KTX2 texture
  2093. >20 lelong x \b, %u
  2094. >24 lelong >1 x %u
  2095. >28 lelong >1 x %u
  2096. >32 lelong >1 \b, %u layers
  2097. >36 lelong >1 \b, %u faces
  2098. >40 lelong >1 \b, %u mipmaps
  2099. >44 lelong >0 \b,
  2100. >>44 use khronos-ktx2-supercompression
  2101. >12 lelong >0 \b,
  2102. >>12 use khronos-ktx2-vkFormat
  2103. # Type: Valve VTF texture.
  2104. # From: David Korth <gerbilsoft@gerbilsoft.com>
  2105. # References:
  2106. # - https://developer.valvesoftware.com/wiki/Valve_Texture_Format
  2107. # VTF image formats.
  2108. 0 name vtf-image-format
  2109. >0 lelong 0 RGBA8888
  2110. >0 lelong 1 ABGR8888
  2111. >0 lelong 2 RGB888
  2112. >0 lelong 3 BGR888
  2113. >0 lelong 4 RGB565
  2114. >0 lelong 5 I8
  2115. >0 lelong 6 IA88
  2116. >0 lelong 7 P8
  2117. >0 lelong 8 A8
  2118. >0 lelong 9 RGB888 (bluescreen)
  2119. >0 lelong 10 BGR888 (bluescreen)
  2120. >0 lelong 11 ARGB8888
  2121. >0 lelong 12 BGRA8888
  2122. >0 lelong 13 DXT1
  2123. >0 lelong 14 DXT3
  2124. >0 lelong 15 DXT5
  2125. >0 lelong 16 BGRx8888
  2126. >0 lelong 17 BGR565
  2127. >0 lelong 18 BGRx5551
  2128. >0 lelong 19 BGRA4444
  2129. >0 lelong 20 DXT1+A1
  2130. >0 lelong 21 BGRA5551
  2131. >0 lelong 22 UV88
  2132. >0 lelong 23 UVWQ8888
  2133. >0 lelong 24 RGBA16161616F
  2134. >0 lelong 25 RGBA16161616
  2135. >0 lelong 26 UVLX8888
  2136. # Main VTF header.
  2137. 0 string VTF\0 Valve Texture Format
  2138. >4 lelong x v%u
  2139. >8 lelong x \b.%u
  2140. >0x10 leshort x \b, %u
  2141. >0x12 leshort >1 x %u
  2142. >4 lequad 0x0000000700000002
  2143. >>0x3F leshort >1 x %u
  2144. >0x18 leshort >1 \b, %u frames
  2145. >0x38 byte x \b, mipmaps: %u
  2146. >0x34 lelong >-1 \b,
  2147. >>0x34 use vtf-image-format
  2148. # Type: Valve VTF3 (PS3) texture.
  2149. # From: David Korth <gerbilsoft@gerbilsoft.com>
  2150. 0 string VTF3 Valve Texture Format (PS3)
  2151. >0x14 beshort x \b, %u
  2152. >0x16 beshort x \b x %u
  2153. >0x10 belong&0x2000 0 \b, DXT1
  2154. >0x10 belong&0x2000 0x2000 \b, DXT5
  2155. # Type: ASTC texture.
  2156. # From: David Korth <gerbilsoft@gerbilsoft.com>
  2157. # References:
  2158. # - https://stackoverflow.com/questions/22600678/determine-internal-format-of-given-astc-compressed-image-through-its-header
  2159. # - https://stackoverflow.com/a/22682244
  2160. 0 lelong 0x5ca1ab13 ASTC
  2161. >4 byte x %u
  2162. >5 byte x \bx%u
  2163. >6 byte >1 \bx%u
  2164. # X, Y, and Z dimensions are stored as 24-bit LE.
  2165. # Pretend it's 32-bit and mask off the high byte.
  2166. >7 lelong&0x00FFFFFF x texture, %u
  2167. >10 lelong&0x00FFFFFF x x %u
  2168. >13 lelong&0x00FFFFFF >1 x %u
  2169. # Zebra Metafile graphic
  2170. # http://www.fileformat.info/format/zbr/egff.htm
  2171. 0 beshort 0x9a02 Zebra Metafile graphic
  2172. >2 leshort 1 (version 1.x)
  2173. >2 leshort 2 (version 1.1x or 1.2x)
  2174. >2 leshort 3 (version 1.49)
  2175. >2 leshort 4 (version 1.50)
  2176. >4 string x (comment = %s)
  2177. # Microsoft Paint graphic
  2178. # http://www.fileformat.info/format/mspaint/egff.htm
  2179. 0 string DanM icrosoft Paint image data (version 1.x)
  2180. >4 leshort x (%d
  2181. >>6 leshort x x %d)
  2182. 0 string LinS Microsoft Paint image data (version 2.0)
  2183. >4 leshort x (%d
  2184. >>6 leshort x x %d)
  2185. # reMarkable tablet internal file format (https://www.remarkable.com/)
  2186. # https://github.com/ax3l/lines-are-beautiful
  2187. # https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/\
  2188. # reMarkable-lines-file-format.html#what-to-do-next
  2189. # from Axel Huebl
  2190. 0 string reMarkable
  2191. >11 string lines
  2192. >>17 string with
  2193. >>>22 string selections
  2194. >>>>33 string and
  2195. >>>>>37 string layers
  2196. >>>>>>43 lelong x reMarkable tablet notebook lines, 1404 x 1872, %x page(s)
  2197. # newer per-page files for the reMarkable
  2198. 0 string reMarkable
  2199. >11 string .lines
  2200. >>18 string file,
  2201. >>>24 string version=
  2202. >>>>32 byte x reMarkable tablet page (v%c), 1404 x 1872,
  2203. >>>>>43 lelong x %d layer(s)
  2204. # Type: PVR3 texture.
  2205. # From: David Korth <gerbilsoft@gerbilsoft.com>
  2206. # References:
  2207. # - http://cdn.imgtec.com/sdk-documentation/PVR+File+Format.Specification.pdf
  2208. # PVR3 pixel formats.
  2209. 0 name pvr3-pixel-format
  2210. >0 ulelong 0 PVRTC 2bpp RGB
  2211. >0 ulelong 1 PVRTC 2bpp RGBA
  2212. >0 ulelong 2 PVRTC 4bpp RGB
  2213. >0 ulelong 3 PVRTC 4bpp RGBA
  2214. >0 ulelong 4 PVRTC-II 2bpp
  2215. >0 ulelong 5 PVRTC-II 4bpp
  2216. >0 ulelong 6 ETC1
  2217. >0 ulelong 7 DXT1
  2218. >0 ulelong 8 DXT2
  2219. >0 ulelong 9 DXT3
  2220. >0 ulelong 10 DXT4
  2221. >0 ulelong 11 DXT5
  2222. >0 ulelong 12 BC4
  2223. >0 ulelong 13 BC5
  2224. >0 ulelong 14 BC6
  2225. >0 ulelong 15 BC7
  2226. >0 ulelong 16 UYVY
  2227. >0 ulelong 17 YUY2
  2228. >0 ulelong 18 BW1bpp
  2229. >0 ulelong 19 R9G9B9E5 Shared Exponent
  2230. >0 ulelong 20 RGBG8888
  2231. >0 ulelong 21 GRGB8888
  2232. >0 ulelong 22 ETC2 RGB
  2233. >0 ulelong 23 ETC2 RGBA
  2234. >0 ulelong 24 ETC2 RGB A1
  2235. >0 ulelong 25 EAC R11
  2236. >0 ulelong 26 EAC RG11
  2237. >0 ulelong 27 ASTC_4x4
  2238. >0 ulelong 28 ASTC_5x4
  2239. >0 ulelong 29 ASTC_5x5
  2240. >0 ulelong 30 ASTC_6x5
  2241. >0 ulelong 31 ASTC_6x6
  2242. >0 ulelong 32 ASTC_8x5
  2243. >0 ulelong 33 ASTC_8x6
  2244. >0 ulelong 34 ASTC_8x8
  2245. >0 ulelong 35 ASTC_10x5
  2246. >0 ulelong 36 ASTC_10x6
  2247. >0 ulelong 37 ASTC_10x8
  2248. >0 ulelong 38 ASTC_10x10
  2249. >0 ulelong 39 ASTC_12x10
  2250. >0 ulelong 40 ASTC_12x12
  2251. >0 ulelong 41 ASTC_3x3x3
  2252. >0 ulelong 42 ASTC_4x3x3
  2253. >0 ulelong 43 ASTC_4x4x3
  2254. >0 ulelong 44 ASTC_4x4x4
  2255. >0 ulelong 45 ASTC_5x4x4
  2256. >0 ulelong 46 ASTC_5x5x4
  2257. >0 ulelong 47 ASTC_5x5x5
  2258. >0 ulelong 48 ASTC_6x5x5
  2259. >0 ulelong 49 ASTC_6x6x5
  2260. >0 ulelong 50 ASTC_6x6x6
  2261. 0 string PVR\x03 PowerVR 3.0 texture:
  2262. >0x18 ulelong x %u x
  2263. >0x1C ulelong x %u
  2264. >0x20 ulelong >1 x %u
  2265. >0x08 byte x \b,
  2266. >0x0C ulelong 0
  2267. >>0x08 use pvr3-pixel-format
  2268. >0x0C ulelong !0
  2269. >>0x08 byte !0 %c
  2270. >>>0x0C byte !0 \b%u
  2271. >>0x09 byte !0 \b%c
  2272. >>>0x0D byte !0 \b%u
  2273. >>0x0A byte !0 \b%c
  2274. >>>0x0E byte !0 \b%u
  2275. >>0x0B byte !0 \b%c
  2276. >>>0x0F byte !0 \b%u
  2277. >0x10 ulelong 1 \b, sRGB
  2278. >0x04 ulelong&0x02 0x02 \b, premultiplied alpha
  2279. 0 string \x03RVP PowerVR 3.0 texture: BE,
  2280. >0x18 ubelong x %u x
  2281. >0x1C ubelong x %u
  2282. >0x20 ubelong >1 x %u
  2283. >0x08 byte x \b,
  2284. >0x0C ubelong 0
  2285. >>0x08 use pvr3-pixel-format
  2286. >0x0C ubelong !0
  2287. >>0x0B byte !0 %c
  2288. >>>0x0F byte !0 \b%u
  2289. >>0x0A byte !0 \b%c
  2290. >>>0x0E byte !0 \b%u
  2291. >>0x09 byte !0 \b%c
  2292. >>>0x0D byte !0 \b%u
  2293. >>0x08 byte !0 \b%c
  2294. >>>0x0C byte !0 \b%u
  2295. >0x10 ubelong 1 \b, sRGB
  2296. >0x04 ubelong&0x02 0x02 \b, premultiplied alpha
  2297. # Type: Microsoft Xbox XPR0 texture.
  2298. # From: David Korth <gerbilsoft@gerbilsoft.com>
  2299. # References:
  2300. # - https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/develop/src/core/hle/D3D8/XbD3D8Types.h
  2301. # XPR pixel formats.
  2302. 0 name xbox-xpr-pixel-format
  2303. >0 byte 0x00 L8
  2304. >0 byte 0x01 AL8
  2305. >0 byte 0x02 ARGB1555
  2306. >0 byte 0x03 RGB555
  2307. >0 byte 0x04 ARGB4444
  2308. >0 byte 0x05 RGB565
  2309. >0 byte 0x06 ARGB8888
  2310. >0 byte 0x07 xRGB8888
  2311. >0 byte 0x0B P8
  2312. >0 byte 0x0C DXT1
  2313. >0 byte 0x0E DXT2
  2314. >0 byte 0x0F DXT4
  2315. >0 byte 0x10 Linear ARGB1555
  2316. >0 byte 0x11 Linear RGB565
  2317. >0 byte 0x12 Linear ARGB8888
  2318. >0 byte 0x13 Linear L8
  2319. >0 byte 0x16 Linear R8B8
  2320. >0 byte 0x17 Linear G8B8
  2321. >0 byte 0x19 A8
  2322. >0 byte 0x1A A8L8
  2323. >0 byte 0x1B Linear AL8
  2324. >0 byte 0x1C Linear RGB555
  2325. >0 byte 0x1D Linear ARGB4444
  2326. >0 byte 0x1E Linear xRGB8888
  2327. >0 byte 0x1F Linear A8
  2328. >0 byte 0x20 Linear A8L8
  2329. >0 byte 0x24 YUY2
  2330. >0 byte 0x25 UYVY
  2331. >0 byte 0x27 L6V5U5
  2332. >0 byte 0x28 V8U8
  2333. >0 byte 0x29 R8B8
  2334. >0 byte 0x2A D24S8
  2335. >0 byte 0x2B F24S8
  2336. >0 byte 0x2C D16
  2337. >0 byte 0x2D F16
  2338. >0 byte 0x2E Linear D24S8
  2339. >0 byte 0x2F Linear F24S8
  2340. >0 byte 0x30 Linear D16
  2341. >0 byte 0x31 Linear F16
  2342. >0 byte 0x32 L16
  2343. >0 byte 0x33 V16U16
  2344. >0 byte 0x35 Linear L16
  2345. >0 byte 0x36 Linear V16U16
  2346. >0 byte 0x37 Linear L6V5U5
  2347. >0 byte 0x38 RGBA5551
  2348. >0 byte 0x39 RGBA4444
  2349. >0 byte 0x3A QWVU8888
  2350. >0 byte 0x3B BGRA8888
  2351. >0 byte 0x3C RGBA8888
  2352. >0 byte 0x3D Linear RGBA5551
  2353. >0 byte 0x3E Linear RGBA4444
  2354. >0 byte 0x3F Linear ABGR8888
  2355. >0 byte 0x40 Linear BGRA8888
  2356. >0 byte 0x41 Linear RGBA8888
  2357. >0 byte 0x64 Vertex Data
  2358. 0 string XPR0 Microsoft Xbox XPR0 texture
  2359. >0x19 byte x \b, format:
  2360. >>0x19 use xbox-xpr-pixel-format
  2361. # ILDA Image Data Transfer Format
  2362. # https://www.ilda.com/resources/StandardsDocs/ILDA_IDTF14_rev011.pdf
  2363. #
  2364. # Updated by Chuck Hein (laser@geekdude.com)
  2365. #
  2366. 0 string ILDA ILDA Image Data Transfer Format
  2367. >7 byte 0x00 3D Coordinates with Indexed Color
  2368. >7 byte 0x01 2D Coordinates with Indexed Color
  2369. >7 byte 0x02 Color Palette
  2370. >7 byte 0x04 3D Coordinates with True Color
  2371. >7 byte 0x05 2D Coordinates with True Color
  2372. >8 string >0 \b, palette %s
  2373. >16 string >0 \b, company %s
  2374. >24 beshort >0 \b, number of records %d
  2375. >>26 beshort x \b, palette number %d
  2376. >>28 beshort >0 \b, number of frames %d
  2377. >>30 byte >0 \b, projector number %d
  2378. # Dropbox "lepton" compressed jpeg format
  2379. # https://github.com/dropbox/lepton
  2380. 0 belong&0xfffff0ff 0xcf84005a Lepton image file
  2381. >2 byte x (version %d)
  2382. # Apple QuickTake camera raw images
  2383. # https://en.wikipedia.org/wiki/Apple_QuickTake
  2384. # dcraw can decode them
  2385. 0 name quicktake
  2386. >4 belong 8
  2387. >>544 beshort x \b, %dx
  2388. >>546 beshort x \b%d
  2389. >4 belong 4
  2390. >>546 beshort x \b, %dx
  2391. >>544 beshort x \b%d
  2392. 0 string qktk Apple QuickTake 100 Raw Image
  2393. >0 use quicktake
  2394. 0 string qktn
  2395. >4 byte 0 Apple QuickTake 150 Raw Image
  2396. >4 byte >0 Apple QuickTake 200 Raw Image
  2397. >0 use quicktake