1226048Sobrien 268349Sobrien#------------------------------------------------------------------------------ 3284778Sdelphij# $File: images,v 1.106 2015/02/22 01:26:05 christos Exp $ 4186690Sobrien# images: file(1) magic for image formats (see also "iff", and "c-lang" for 5186690Sobrien# XPM bitmaps) 668349Sobrien# 768349Sobrien# originally from jef@helios.ee.lbl.gov (Jef Poskanzer), 868349Sobrien# additions by janl@ifi.uio.no as well as others. Jan also suggested 968349Sobrien# merging several one- and two-line files into here. 1068349Sobrien# 1168349Sobrien# little magic: PCX (first byte is 0x0a) 1268349Sobrien 1368349Sobrien# Targa - matches `povray', `ppmtotga' and `xv' outputs 1468349Sobrien# by Philippe De Muyter <phdm@macqel.be> 1568349Sobrien# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 1668349Sobrien# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise 1768349Sobrien# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs 1868349Sobrien# `xv' recognizes only a subset of the following (RGB with pixelsize = 24) 1968349Sobrien# `tgatoppm' recognizes a superset (Index may be anything) 2068349Sobrien1 belong&0xfff7ffff 0x01010000 Targa image data - Map 21267843Sdelphij!:strength + 2 2268349Sobrien>2 byte&8 8 - RLE 23267843Sdelphij>12 leshort >0 %d x 24267843Sdelphij>14 leshort >0 %d 2568349Sobrien1 belong&0xfff7ffff 0x00020000 Targa image data - RGB 26267843Sdelphij!:strength + 2 2768349Sobrien>2 byte&8 8 - RLE 28267843Sdelphij>12 leshort >0 %d x 29267843Sdelphij>14 leshort >0 %d 3068349Sobrien1 belong&0xfff7ffff 0x00030000 Targa image data - Mono 31267843Sdelphij!:strength + 2 3268349Sobrien>2 byte&8 8 - RLE 33267843Sdelphij>12 leshort >0 %d x 34267843Sdelphij>14 leshort >0 %d 3568349Sobrien 3668349Sobrien# PBMPLUS images 3768349Sobrien# The next byte following the magic is always whitespace. 38267843Sdelphij# strength is changed to try these patterns before "x86 boot sector" 39284778Sdelphij0 name netpbm 40284778Sdelphij>3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm PPM image data 41284778Sdelphij>>&0 regex =[0-9]{1,50} \b, size = %s x 42284778Sdelphij>>>&0 regex =[0-9]{1,50} \b %s 43284778Sdelphij 44267843Sdelphij0 search/1 P1 45284778Sdelphij>0 use netpbm 46284778Sdelphij>>0 string x \b, bitmap 47267843Sdelphij!:strength + 45 48186690Sobrien!:mime image/x-portable-bitmap 49284778Sdelphij 50267843Sdelphij0 search/1 P2 51284778Sdelphij>0 use netpbm 52284778Sdelphij>>0 string x \b, greymap 53267843Sdelphij!:strength + 45 54186690Sobrien!:mime image/x-portable-greymap 55284778Sdelphij 56267843Sdelphij0 search/1 P3 57284778Sdelphij>0 use netpbm 58284778Sdelphij>>0 string x \b, pixmap 59267843Sdelphij!:strength + 45 60186690Sobrien!:mime image/x-portable-pixmap 61284778Sdelphij 62284778Sdelphij 63267843Sdelphij0 string P4 64284778Sdelphij>0 use netpbm 65284778Sdelphij>>0 string x \b, rawbits, bitmap 66267843Sdelphij!:strength + 45 67186690Sobrien!:mime image/x-portable-bitmap 68284778Sdelphij 69267843Sdelphij0 string P5 70284778Sdelphij>0 use netpbm 71284778Sdelphij>>0 string x \b, rawbits, greymap 72267843Sdelphij!:strength + 45 73186690Sobrien!:mime image/x-portable-greymap 74284778Sdelphij 75267843Sdelphij0 string P6 76284778Sdelphij>0 use netpbm 77284778Sdelphij>>0 string x \b, rawbits, pixmap 78267843Sdelphij!:strength + 45 79186690Sobrien!:mime image/x-portable-pixmap 80284778Sdelphij 8169216Sobrien0 string P7 Netpbm PAM image file 82186690Sobrien!:mime image/x-portable-pixmap 8368349Sobrien 8469216Sobrien# From: bryanh@giraffe-data.com (Bryan Henderson) 8569216Sobrien0 string \117\072 Solitaire Image Recorder format 8669216Sobrien>4 string \013 MGI Type 11 8769216Sobrien>4 string \021 MGI Type 17 8869216Sobrien0 string .MDA MicroDesign data 8969216Sobrien>21 byte 48 version 2 9069216Sobrien>21 byte 51 version 3 9169216Sobrien0 string .MDP MicroDesign page data 9269216Sobrien>21 byte 48 version 2 9369216Sobrien>21 byte 51 version 3 9469216Sobrien 9568349Sobrien# NIFF (Navy Interchange File Format, a modification of TIFF) images 96186690Sobrien# [GRR: this *must* go before TIFF] 9768349Sobrien0 string IIN1 NIFF image data 98186690Sobrien!:mime image/x-niff 9968349Sobrien 100226048Sobrien# Canon RAW version 1 (CRW) files are a type of Canon Image File Format 101226048Sobrien# (CIFF) file. These are apparently all little-endian. 102226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 103226048Sobrien# URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html 104226048Sobrien0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data 105226048Sobrien!:mime image/x-canon-crw 106226048Sobrien>16 leshort x \b, version %d. 107226048Sobrien>14 leshort x \b%d 108226048Sobrien 109226048Sobrien# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic 110226048Sobrien# number. Put this above the TIFF test to make sure we detect them. 111226048Sobrien# These are apparently all little-endian. 112226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 113226048Sobrien# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2 114226048Sobrien0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data 115226048Sobrien!:mime image/x-canon-cr2 116226048Sobrien>10 byte x \b, version %d. 117226048Sobrien>11 byte x \b%d 118226048Sobrien 11968349Sobrien# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) 12068349Sobrien# The second word of TIFF files is the TIFF version number, 42, which has 12168349Sobrien# never changed. The TIFF specification recommends testing for it. 12268349Sobrien0 string MM\x00\x2a TIFF image data, big-endian 123186690Sobrien!:mime image/tiff 124277592Sdelphij>(4.L) use \^tiff_ifd 12568349Sobrien0 string II\x2a\x00 TIFF image data, little-endian 126186690Sobrien!:mime image/tiff 127276415Sdelphij>(4.l) use tiff_ifd 12868349Sobrien 129276415Sdelphij0 name tiff_ifd 130276415Sdelphij>0 leshort x \b, direntries=%d 131276415Sdelphij>2 use tiff_entry 132276415Sdelphij 133276415Sdelphij0 name tiff_entry 134277592Sdelphij# NewSubFileType 135277592Sdelphij>0 leshort 0xfe 136277592Sdelphij>>12 use tiff_entry 137276415Sdelphij>0 leshort 0x100 138276415Sdelphij>>4 lelong 1 139276415Sdelphij>>>12 use tiff_entry 140277592Sdelphij>>>8 leshort x \b, width=%d 141276415Sdelphij>0 leshort 0x101 142276415Sdelphij>>4 lelong 1 143277592Sdelphij>>>8 leshort x \b, height=%d 144276415Sdelphij>>>12 use tiff_entry 145276415Sdelphij>0 leshort 0x102 146277592Sdelphij>>8 leshort x \b, bps=%d 147276415Sdelphij>>12 use tiff_entry 148276415Sdelphij>0 leshort 0x103 149276415Sdelphij>>4 lelong 1 \b, compression= 150277592Sdelphij>>>8 leshort 1 \bnone 151277592Sdelphij>>>8 leshort 2 \bhuffman 152277592Sdelphij>>>8 leshort 3 \bbi-level group 3 153277592Sdelphij>>>8 leshort 4 \bbi-level group 4 154277592Sdelphij>>>8 leshort 5 \bLZW 155277592Sdelphij>>>8 leshort 6 \bJPEG (old) 156277592Sdelphij>>>8 leshort 7 \bJPEG 157277592Sdelphij>>>8 leshort 8 \bdeflate 158277592Sdelphij>>>8 leshort 9 \bJBIG, ITU-T T.85 159277592Sdelphij>>>8 leshort 0xa \bJBIG, ITU-T T.43 160277592Sdelphij>>>8 leshort 0x7ffe \bNeXT RLE 2-bit 161277592Sdelphij>>>8 leshort 0x8005 \bPackBits (Macintosh RLE) 162277592Sdelphij>>>8 leshort 0x8029 \bThunderscan RLE 163277592Sdelphij>>>8 leshort 0x807f \bRasterPadding (CT or MP) 164277592Sdelphij>>>8 leshort 0x8080 \bRLE (Line Work) 165277592Sdelphij>>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone) 166277592Sdelphij>>>8 leshort 0x8082 \bRLE (Binary Line Work) 167277592Sdelphij>>>8 leshort 0x80b2 \bDeflate (PKZIP) 168277592Sdelphij>>>8 leshort 0x80b3 \bKodak DCS 169277592Sdelphij>>>8 leshort 0x8765 \bJBIG 170277592Sdelphij>>>8 leshort 0x8798 \bJPEG2000 171277592Sdelphij>>>8 leshort 0x8799 \bNikon NEF Compressed 172276415Sdelphij>>>8 default x 173277592Sdelphij>>>>8 leshort x \b(unknown 0x%x) 174276415Sdelphij>>>12 use tiff_entry 175276415Sdelphij>0 leshort 0x106 \b, PhotometricIntepretation= 176284778Sdelphij>>8 clear x 177277592Sdelphij>>8 leshort 0 \bWhiteIsZero 178277592Sdelphij>>8 leshort 1 \bBlackIsZero 179277592Sdelphij>>8 leshort 2 \bRGB 180277592Sdelphij>>8 leshort 3 \bRGB Palette 181277592Sdelphij>>8 leshort 4 \bTransparency Mask 182277592Sdelphij>>8 leshort 5 \bCMYK 183277592Sdelphij>>8 leshort 6 \bYCbCr 184277592Sdelphij>>8 leshort 8 \bCIELab 185284778Sdelphij>>8 default x 186277592Sdelphij>>>8 leshort x \b(unknown=0x%x) 187276415Sdelphij>>12 use tiff_entry 188276415Sdelphij# FillOrder 189276415Sdelphij>0 leshort 0x10a 190276415Sdelphij>>4 lelong 1 191276415Sdelphij>>>12 use tiff_entry 192276415Sdelphij# DocumentName 193276415Sdelphij>0 leshort 0x10d 194276415Sdelphij>>(8.l) string x \b, name=%s 195276415Sdelphij>>>12 use tiff_entry 196276415Sdelphij# ImageDescription 197276415Sdelphij>0 leshort 0x10e 198276415Sdelphij>>(8.l) string x \b, description=%s 199276415Sdelphij>>>12 use tiff_entry 200277592Sdelphij# Make 201277592Sdelphij>0 leshort 0x10f 202277592Sdelphij>>(8.l) string x \b, manufacturer=%s 203277592Sdelphij>>>12 use tiff_entry 204277592Sdelphij# Model 205277592Sdelphij>0 leshort 0x110 206277592Sdelphij>>(8.l) string x \b, model=%s 207277592Sdelphij>>>12 use tiff_entry 208276415Sdelphij# StripOffsets 209276415Sdelphij>0 leshort 0x111 210276415Sdelphij>>12 use tiff_entry 211277592Sdelphij# Orientation 212277592Sdelphij>0 leshort 0x112 \b, orientation= 213277592Sdelphij>>8 leshort 1 \bupper-left 214277592Sdelphij>>8 leshort 3 \blower-right 215277592Sdelphij>>8 leshort 6 \bupper-right 216277592Sdelphij>>8 leshort 8 \blower-left 217277592Sdelphij>>8 leshort 9 \bundefined 218277592Sdelphij>>8 default x 219277592Sdelphij>>>8 leshort x \b[*%d*] 220276415Sdelphij>>12 use tiff_entry 221277592Sdelphij# XResolution 222277592Sdelphij>0 leshort 0x11a 223277592Sdelphij>>8 lelong x \b, xresolution=%d 224277592Sdelphij>>12 use tiff_entry 225277592Sdelphij# YResolution 226277592Sdelphij>0 leshort 0x11b 227277592Sdelphij>>8 lelong x \b, yresolution=%d 228277592Sdelphij>>12 use tiff_entry 229277592Sdelphij# ResolutionUnit 230277592Sdelphij>0 leshort 0x128 231277592Sdelphij>>8 leshort x \b, resolutionunit=%d 232277592Sdelphij>>12 use tiff_entry 233277592Sdelphij# Software 234277592Sdelphij>0 leshort 0x131 235277592Sdelphij>>(8.l) string x \b, software=%s 236277592Sdelphij>>12 use tiff_entry 237276415Sdelphij# Datetime 238276415Sdelphij>0 leshort 0x132 239276415Sdelphij>>(8.l) string x \b, datetime=%s 240277592Sdelphij>>12 use tiff_entry 241276415Sdelphij# HostComputer 242276415Sdelphij>0 leshort 0x13c 243276415Sdelphij>>(8.l) string x \b, hostcomputer=%s 244277592Sdelphij>>12 use tiff_entry 245277592Sdelphij# WhitePoint 246277592Sdelphij>0 leshort 0x13e 247277592Sdelphij>>12 use tiff_entry 248277592Sdelphij# PrimaryChromaticities 249277592Sdelphij>0 leshort 0x13f 250277592Sdelphij>>12 use tiff_entry 251277592Sdelphij# YCbCrCoefficients 252277592Sdelphij>0 leshort 0x211 253277592Sdelphij>>12 use tiff_entry 254277592Sdelphij# YCbCrPositioning 255277592Sdelphij>0 leshort 0x213 256277592Sdelphij>>12 use tiff_entry 257277592Sdelphij# ReferenceBlackWhite 258277592Sdelphij>0 leshort 0x214 259277592Sdelphij>>12 use tiff_entry 260277592Sdelphij# Copyright 261277592Sdelphij>0 leshort 0x8298 262277592Sdelphij>>(8.l) string x \b, copyright=%s 263277592Sdelphij>>12 use tiff_entry 264277592Sdelphij# ExifOffset 265277592Sdelphij>0 leshort 0x8769 266277592Sdelphij>>12 use tiff_entry 267277592Sdelphij# GPS IFD 268277592Sdelphij>0 leshort 0x8825 \b, GPS-Data 269277592Sdelphij>>12 use tiff_entry 270277592Sdelphij 271276415Sdelphij#>0 leshort x \b, unknown=0x%x 272277592Sdelphij#>>12 use tiff_entry 273276415Sdelphij 274234250Sobrien0 string MM\x00\x2b Big TIFF image data, big-endian 275234250Sobrien!:mime image/tiff 276234250Sobrien0 string II\x2b\x00 Big TIFF image data, little-endian 277234250Sobrien!:mime image/tiff 278234250Sobrien 27968349Sobrien# PNG [Portable Network Graphics, or "PNG's Not GIF"] images 28068349Sobrien# (Greg Roelofs, newt@uchicago.edu) 28168349Sobrien# (Albert Cahalan, acahalan@cs.uml.edu) 28268349Sobrien# 28368349Sobrien# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... 28468349Sobrien# 285226048Sobrien0 string \x89PNG\x0d\x0a\x1a\x0a PNG image data 286186690Sobrien!:mime image/png 287267843Sdelphij>16 belong x \b, %d x 288267843Sdelphij>20 belong x %d, 289186690Sobrien>24 byte x %d-bit 290186690Sobrien>25 byte 0 grayscale, 291186690Sobrien>25 byte 2 \b/color RGB, 292186690Sobrien>25 byte 3 colormap, 293186690Sobrien>25 byte 4 gray+alpha, 294186690Sobrien>25 byte 6 \b/color RGBA, 295186690Sobrien#>26 byte 0 deflate/32K, 296186690Sobrien>28 byte 0 non-interlaced 297186690Sobrien>28 byte 1 interlaced 29868349Sobrien 299186690Sobrien# possible GIF replacements; none yet released! 300186690Sobrien# (Greg Roelofs, newt@uchicago.edu) 301186690Sobrien# 302186690Sobrien# GRR 950115: this was mine ("Zip GIF"): 303186690Sobrien0 string GIF94z ZIF image (GIF+deflate alpha) 304186690Sobrien!:mime image/x-unknown 305186690Sobrien# 306186690Sobrien# GRR 950115: this is Jeremy Wohl's Free Graphics Format (better): 307186690Sobrien# 308186690Sobrien0 string FGF95a FGF image (GIF+deflate beta) 309186690Sobrien!:mime image/x-unknown 310186690Sobrien# 311186690Sobrien# GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal 312186690Sobrien# (best; not yet implemented): 313186690Sobrien# 314186690Sobrien0 string PBF PBF image (deflate compression) 315186690Sobrien!:mime image/x-unknown 316186690Sobrien 31768349Sobrien# GIF 31868349Sobrien0 string GIF8 GIF image data 319186690Sobrien!:mime image/gif 320191736Sobrien!:apple 8BIMGIFf 32168349Sobrien>4 string 7a \b, version 8%s, 32268349Sobrien>4 string 9a \b, version 8%s, 323267843Sdelphij>6 leshort >0 %d x 324267843Sdelphij>8 leshort >0 %d 32568349Sobrien#>10 byte &0x80 color mapped, 32668349Sobrien#>10 byte&0x07 =0x00 2 colors 32768349Sobrien#>10 byte&0x07 =0x01 4 colors 32868349Sobrien#>10 byte&0x07 =0x02 8 colors 32968349Sobrien#>10 byte&0x07 =0x03 16 colors 33068349Sobrien#>10 byte&0x07 =0x04 32 colors 33168349Sobrien#>10 byte&0x07 =0x05 64 colors 33268349Sobrien#>10 byte&0x07 =0x06 128 colors 33368349Sobrien#>10 byte&0x07 =0x07 256 colors 33468349Sobrien 33568349Sobrien# ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster, 33668349Sobrien# 1 plane, no encoding. 33768349Sobrien0 string \361\0\100\273 CMU window manager raster image data 33868349Sobrien>4 lelong >0 %d x 33968349Sobrien>8 lelong >0 %d, 34068349Sobrien>12 lelong >0 %d-bit 34168349Sobrien 34268349Sobrien# Magick Image File Format 34368349Sobrien0 string id=ImageMagick MIFF image data 34468349Sobrien 34568349Sobrien# Artisan 34668349Sobrien0 long 1123028772 Artisan image data 34768349Sobrien>4 long 1 \b, rectangular 24-bit 34868349Sobrien>4 long 2 \b, rectangular 8-bit with colormap 34968349Sobrien>4 long 3 \b, rectangular 32-bit (24-bit with matte) 35068349Sobrien 35168349Sobrien# FIG (Facility for Interactive Generation of figures), an object-based format 352186690Sobrien0 search/1 #FIG FIG image text 35368349Sobrien>5 string x \b, version %.3s 35468349Sobrien 35568349Sobrien# PHIGS 35668349Sobrien0 string ARF_BEGARF PHIGS clear text archive 35768349Sobrien0 string @(#)SunPHIGS SunPHIGS 35868349Sobrien# version number follows, in the form m.n 35968349Sobrien>40 string SunBin binary 36068349Sobrien>32 string archive archive 36168349Sobrien 36268349Sobrien# GKS (Graphics Kernel System) 36368349Sobrien0 string GKSM GKS Metafile 36468349Sobrien>24 string SunGKS \b, SunGKS 36568349Sobrien 36668349Sobrien# CGM image files 36768349Sobrien0 string BEGMF clear text Computer Graphics Metafile 36868349Sobrien 36968349Sobrien# MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de) 37068349Sobrien0 string yz MGR bitmap, modern format, 8-bit aligned 37168349Sobrien0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned 37268349Sobrien0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned 37368349Sobrien0 string yx MGR bitmap, modern format, squeezed 37468349Sobrien 37568349Sobrien# Fuzzy Bitmap (FBM) images 37668349Sobrien0 string %bitmap\0 FBM image data 37768349Sobrien>30 long 0x31 \b, mono 37868349Sobrien>30 long 0x33 \b, color 37968349Sobrien 38068349Sobrien# facsimile data 38168349Sobrien1 string PC\ Research,\ Inc group 3 fax data 38268349Sobrien>29 byte 0 \b, normal resolution (204x98 DPI) 38368349Sobrien>29 byte 1 \b, fine resolution (204x196 DPI) 384110949Sobrien# From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at> 385110949Sobrien0 string Sfff structured fax file 38668349Sobrien 387267843Sdelphij# From: Joerg Jenderek <joerg.jen.der.ek@gmx.net> 388267843Sdelphij# most files with the extension .EPA and some with .BMP 389267843Sdelphij0 string \x11\x06 Award BIOS Logo, 136 x 84 390267843Sdelphij!:mime image/x-award-bioslogo 391267843Sdelphij0 string \x11\x09 Award BIOS Logo, 136 x 126 392267843Sdelphij!:mime image/x-award-bioslogo 393267843Sdelphij#0 string \x07\x1f BIOS Logo corrupted? 394267843Sdelphij# http://www.blackfiveservices.co.uk/awbmtools.shtml 395267843Sdelphij# http://biosgfx.narod.ru/v3/ 396267843Sdelphij# http://biosgfx.narod.ru/abr-2/ 397267843Sdelphij0 string AWBM 398267843Sdelphij>4 leshort <1981 Award BIOS bitmap 399267843Sdelphij!:mime image/x-award-bmp 400267843Sdelphij# image width is a multiple of 4 401267843Sdelphij>>4 leshort&0x0003 0 402267843Sdelphij>>>4 leshort x \b, %d 403267843Sdelphij>>>6 leshort x x %d 404267843Sdelphij>>4 leshort&0x0003 >0 \b, 405267843Sdelphij>>>4 leshort&0x0003 =1 406267843Sdelphij>>>>4 leshort x %d+3 407267843Sdelphij>>>4 leshort&0x0003 =2 408267843Sdelphij>>>>4 leshort x %d+2 409267843Sdelphij>>>4 leshort&0x0003 =3 410267843Sdelphij>>>>4 leshort x %d+1 411267843Sdelphij>>>6 leshort x x %d 412267843Sdelphij# at offset 8 starts imagedata followed by "RGB " marker 413110949Sobrien 414186690Sobrien# PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) 415267843Sdelphij# http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\ 416267843Sdelphij# 28bitmap_information_header.29 417186690Sobrien0 string BM 418186690Sobrien>14 leshort 12 PC bitmap, OS/2 1.x format 419186690Sobrien!:mime image/x-ms-bmp 42068349Sobrien>>18 leshort x \b, %d x 42168349Sobrien>>20 leshort x %d 422186690Sobrien>14 leshort 64 PC bitmap, OS/2 2.x format 423186690Sobrien!:mime image/x-ms-bmp 42468349Sobrien>>18 leshort x \b, %d x 42568349Sobrien>>20 leshort x %d 426186690Sobrien>14 leshort 40 PC bitmap, Windows 3.x format 427186690Sobrien!:mime image/x-ms-bmp 42868349Sobrien>>18 lelong x \b, %d x 42968349Sobrien>>22 lelong x %d x 43068349Sobrien>>28 leshort x %d 431267843Sdelphij>14 leshort 124 PC bitmap, Windows 98/2000 and newer format 432267843Sdelphij!:mime image/x-ms-bmp 433267843Sdelphij>>18 lelong x \b, %d x 434267843Sdelphij>>22 lelong x %d x 435267843Sdelphij>>28 leshort x %d 436267843Sdelphij>14 leshort 108 PC bitmap, Windows 95/NT4 and newer format 437267843Sdelphij!:mime image/x-ms-bmp 438267843Sdelphij>>18 lelong x \b, %d x 439267843Sdelphij>>22 lelong x %d x 440267843Sdelphij>>28 leshort x %d 441186690Sobrien>14 leshort 128 PC bitmap, Windows NT/2000 format 442186690Sobrien!:mime image/x-ms-bmp 443186690Sobrien>>18 lelong x \b, %d x 444186690Sobrien>>22 lelong x %d x 445186690Sobrien>>28 leshort x %d 446133359Sobrien# Too simple - MPi 447133359Sobrien#0 string IC PC icon data 448133359Sobrien#0 string PI PC pointer image data 449133359Sobrien#0 string CI PC color icon data 450133359Sobrien#0 string CP PC color pointer image data 45168349Sobrien# Conflicts with other entries [BABYL] 45268349Sobrien#0 string BA PC bitmap array data 45368349Sobrien 45468349Sobrien# XPM icons (Greg Roelofs, newt@uchicago.edu) 455186690Sobrien0 search/1 /*\ XPM\ */ X pixmap image text 456234250Sobrien!:mime image/x-xpmi 45768349Sobrien 45868349Sobrien# Utah Raster Toolkit RLE images (janl@ifi.uio.no) 45968349Sobrien0 leshort 0xcc52 RLE image data, 46068349Sobrien>6 leshort x %d x 46168349Sobrien>8 leshort x %d 46268349Sobrien>2 leshort >0 \b, lower left corner: %d 46368349Sobrien>4 leshort >0 \b, lower right corner: %d 46468349Sobrien>10 byte&0x1 =0x1 \b, clear first 46568349Sobrien>10 byte&0x2 =0x2 \b, no background 46668349Sobrien>10 byte&0x4 =0x4 \b, alpha channel 46768349Sobrien>10 byte&0x8 =0x8 \b, comment 46868349Sobrien>11 byte >0 \b, %d color channels 46968349Sobrien>12 byte >0 \b, %d bits per pixel 47068349Sobrien>13 byte >0 \b, %d color map channels 47168349Sobrien 47268349Sobrien# image file format (Robert Potter, potter@cs.rochester.edu) 47368349Sobrien0 string Imagefile\ version- iff image data 47468349Sobrien# this adds the whole header (inc. version number), informative but longish 47568349Sobrien>10 string >\0 %s 47668349Sobrien 47768349Sobrien# Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com) 47868349Sobrien0 belong 0x59a66a95 Sun raster image data 47968349Sobrien>4 belong >0 \b, %d x 48068349Sobrien>8 belong >0 %d, 48168349Sobrien>12 belong >0 %d-bit, 48268349Sobrien#>16 belong >0 %d bytes long, 48368349Sobrien>20 belong 0 old format, 48468349Sobrien#>20 belong 1 standard, 48568349Sobrien>20 belong 2 compressed, 48668349Sobrien>20 belong 3 RGB, 48768349Sobrien>20 belong 4 TIFF, 48868349Sobrien>20 belong 5 IFF, 48968349Sobrien>20 belong 0xffff reserved for testing, 49068349Sobrien>24 belong 0 no colormap 49168349Sobrien>24 belong 1 RGB colormap 49268349Sobrien>24 belong 2 raw colormap 49368349Sobrien#>28 belong >0 colormap is %d bytes long 49468349Sobrien 49568349Sobrien# SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) 49668349Sobrien# 49768349Sobrien# See 49868349Sobrien# http://reality.sgi.com/grafica/sgiimage.html 49968349Sobrien# 50068349Sobrien0 beshort 474 SGI image data 50168349Sobrien#>2 byte 0 \b, verbatim 50268349Sobrien>2 byte 1 \b, RLE 50368349Sobrien#>3 byte 1 \b, normal precision 50468349Sobrien>3 byte 2 \b, high precision 50568349Sobrien>4 beshort x \b, %d-D 50668349Sobrien>6 beshort x \b, %d x 50768349Sobrien>8 beshort x %d 50868349Sobrien>10 beshort x \b, %d channel 50968349Sobrien>10 beshort !1 \bs 51068349Sobrien>80 string >0 \b, "%s" 51168349Sobrien 51268349Sobrien0 string IT01 FIT image data 51368349Sobrien>4 belong x \b, %d x 51468349Sobrien>8 belong x %d x 51568349Sobrien>12 belong x %d 51668349Sobrien# 51768349Sobrien0 string IT02 FIT image data 51868349Sobrien>4 belong x \b, %d x 51968349Sobrien>8 belong x %d x 52068349Sobrien>12 belong x %d 52168349Sobrien# 52268349Sobrien2048 string PCD_IPI Kodak Photo CD image pack file 52384685Sobrien>0xe02 byte&0x03 0x00 , landscape mode 52484685Sobrien>0xe02 byte&0x03 0x01 , portrait mode 52584685Sobrien>0xe02 byte&0x03 0x02 , landscape mode 52684685Sobrien>0xe02 byte&0x03 0x03 , portrait mode 52768349Sobrien0 string PCD_OPA Kodak Photo CD overview pack file 52868349Sobrien 52968349Sobrien# FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu> 53068349Sobrien# FITS is the Flexible Image Transport System, the de facto standard for 53168349Sobrien# data and image transfer, storage, etc., for the astronomical community. 53268349Sobrien# (FITS floating point formats are big-endian.) 53368349Sobrien0 string SIMPLE\ \ = FITS image data 53468349Sobrien>109 string 8 \b, 8-bit, character or unsigned binary integer 53568349Sobrien>108 string 16 \b, 16-bit, two's complement binary integer 53668349Sobrien>107 string \ 32 \b, 32-bit, two's complement binary integer 53768349Sobrien>107 string -32 \b, 32-bit, floating point, single precision 53868349Sobrien>107 string -64 \b, 64-bit, floating point, double precision 53968349Sobrien 54068349Sobrien# other images 54168349Sobrien0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file 54268349Sobrien 54368349Sobrien# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image 54468349Sobrien# stuff. 54568349Sobrien# 54668349Sobrien0 beshort 0x1010 PEX Binary Archive 54768349Sobrien 54868349Sobrien# DICOM medical imaging data 54968349Sobrien128 string DICM DICOM medical imaging data 550186690Sobrien!:mime application/dicom 55174784Sobrien 552133359Sobrien# XWD - X Window Dump file. 55374784Sobrien# As described in /usr/X11R6/include/X11/XWDFile.h 55474784Sobrien# used by the xwd program. 55574784Sobrien# Bradford Castalia, idaeim, 1/01 556226048Sobrien# updated by Adam Buchbinder, 2/09 557226048Sobrien# The following assumes version 7 of the format; the first long is the length 558226048Sobrien# of the header, which is at least 25 4-byte longs, and the one at offset 8 559226048Sobrien# is a constant which is always either 1 or 2. Offset 12 is the pixmap depth, 560226048Sobrien# which is a maximum of 32. 561226048Sobrien0 belong >100 562226048Sobrien>8 belong <3 563226048Sobrien>>12 belong <33 564226048Sobrien>>>4 belong 7 XWD X Window Dump image data 565226048Sobrien!:mime image/x-xwindowdump 566226048Sobrien>>>>100 string >\0 \b, "%s" 567226048Sobrien>>>>16 belong x \b, %dx 568226048Sobrien>>>>20 belong x \b%dx 569226048Sobrien>>>>12 belong x \b%d 57074784Sobrien 57174784Sobrien# PDS - Planetary Data System 57274784Sobrien# These files use Parameter Value Language in the header section. 57374784Sobrien# Unfortunately, there is no certain magic, but the following 57474784Sobrien# strings have been found to be most likely. 57574784Sobrien0 string NJPL1I00 PDS (JPL) image data 57674784Sobrien2 string NJPL1I PDS (JPL) image data 57774784Sobrien0 string CCSD3ZF PDS (CCSD) image data 57874784Sobrien2 string CCSD3Z PDS (CCSD) image data 57974784Sobrien0 string PDS_ PDS image data 58074784Sobrien0 string LBLSIZE= PDS (VICAR) image data 58174784Sobrien 58274784Sobrien# pM8x: ATARI STAD compressed bitmap format 58374784Sobrien# 58474784Sobrien# from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001 58574784Sobrien# p M 8 5/6 xx yy zz data... 58674784Sobrien# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed. 58774784Sobrien# bytes either run horizontally (pM85) or vertically (pM86). yy is the 58874784Sobrien# most frequent byte, xx and zz are runlength escape codes, where xx is 58974784Sobrien# used for runs of yy. 59074784Sobrien# 59174784Sobrien0 string pM85 Atari ST STAD bitmap image data (hor) 59274784Sobrien>5 byte 0x00 (white background) 59374784Sobrien>5 byte 0xFF (black background) 59474784Sobrien0 string pM86 Atari ST STAD bitmap image data (vert) 59574784Sobrien>5 byte 0x00 (white background) 59674784Sobrien>5 byte 0xFF (black background) 59780588Sobrien 598267843Sdelphij# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu 599169962Sobrien# http://www.atarimax.com/jindroush.atari.org/afmtatr.html 600169962Sobrien0 leshort 0x0296 Atari ATR image 601169962Sobrien 60284685Sobrien# XXX: 60384685Sobrien# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other 60484685Sobrien# magic. 60580588Sobrien# SGI RICE image file <mpruett@sgi.com> 60684685Sobrien#0 beshort 0x5249 RICE image 60784685Sobrien#>2 beshort x v%d 60884685Sobrien#>4 beshort x (%d x 60984685Sobrien#>6 beshort x %d) 61084685Sobrien#>8 beshort 0 8 bit 61184685Sobrien#>8 beshort 1 10 bit 61284685Sobrien#>8 beshort 2 12 bit 61384685Sobrien#>8 beshort 3 13 bit 61484685Sobrien#>10 beshort 0 4:2:2 61584685Sobrien#>10 beshort 1 4:2:2:4 61684685Sobrien#>10 beshort 2 4:4:4 61784685Sobrien#>10 beshort 3 4:4:4:4 61884685Sobrien#>12 beshort 1 RGB 61984685Sobrien#>12 beshort 2 CCIR601 62084685Sobrien#>12 beshort 3 RP175 62184685Sobrien#>12 beshort 4 YUV 62284685Sobrien 623110949Sobrien# PCX image files 624110949Sobrien# From: Dan Fandrich <dan@coneharvesters.com> 625267843Sdelphij# updated by Joerg Jenderek at Feb 2013 by http://de.wikipedia.org/wiki/PCX 626267843Sdelphij# http://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt 627267843Sdelphij# GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000 628267843Sdelphij# 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 629267843Sdelphij0 ubelong&0xffF8fe00 0x0a000000 630267843Sdelphij# for PCX bit depth > 0 631267843Sdelphij>3 ubyte >0 632267843Sdelphij# test for valid versions 633267843Sdelphij>>1 ubyte <6 634267843Sdelphij>>>1 ubyte !1 PCX 635267843Sdelphij!:mime image/x-pcx 636267843Sdelphij#!:mime image/pcx 637267843Sdelphij>>>>1 ubyte 0 ver. 2.5 image data 638267843Sdelphij>>>>1 ubyte 2 ver. 2.8 image data, with palette 639267843Sdelphij>>>>1 ubyte 3 ver. 2.8 image data, without palette 640267843Sdelphij>>>>1 ubyte 4 for Windows image data 641267843Sdelphij>>>>1 ubyte 5 ver. 3.0 image data 642267843Sdelphij>>>>4 uleshort x bounding box [%d, 643267843Sdelphij>>>>6 uleshort x %d] - 644267843Sdelphij>>>>8 uleshort x [%d, 645267843Sdelphij>>>>10 uleshort x %d], 646267843Sdelphij>>>>65 ubyte >1 %d planes each of 647267843Sdelphij>>>>3 ubyte x %d-bit 648267843Sdelphij>>>>68 byte 1 colour, 649267843Sdelphij>>>>68 byte 2 grayscale, 650267843Sdelphij# this should not happen 651267843Sdelphij>>>>68 default x image, 652267843Sdelphij>>>>12 leshort >0 %d x 653267843Sdelphij>>>>>14 uleshort x %d dpi, 654267843Sdelphij>>>>2 byte 0 uncompressed 655267843Sdelphij>>>>2 byte 1 RLE compressed 656133359Sobrien 657133359Sobrien# Adobe Photoshop 658226048Sobrien# From: Asbjoern Sloth Toennesen <asbjorn@lila.io> 659133359Sobrien0 string 8BPS Adobe Photoshop Image 660186690Sobrien!:mime image/vnd.adobe.photoshop 661226048Sobrien>4 beshort 2 (PSB) 662226048Sobrien>18 belong x \b, %d x 663226048Sobrien>14 belong x %d, 664226048Sobrien>24 beshort 0 bitmap 665226048Sobrien>24 beshort 1 grayscale 666226048Sobrien>>12 beshort 2 with alpha 667226048Sobrien>24 beshort 2 indexed 668226048Sobrien>24 beshort 3 RGB 669226048Sobrien>>12 beshort 4 \bA 670226048Sobrien>24 beshort 4 CMYK 671226048Sobrien>>12 beshort 5 \bA 672226048Sobrien>24 beshort 7 multichannel 673226048Sobrien>24 beshort 8 duotone 674226048Sobrien>24 beshort 9 lab 675226048Sobrien>12 beshort > 1 676226048Sobrien>>12 beshort x \b, %dx 677226048Sobrien>12 beshort 1 \b, 678226048Sobrien>22 beshort x %d-bit channel 679226048Sobrien>12 beshort > 1 \bs 680133359Sobrien 681133359Sobrien# XV thumbnail indicator (ThMO) 682133359Sobrien0 string P7\ 332 XV thumbnail image data 683133359Sobrien 684133359Sobrien# NITF is defined by United States MIL-STD-2500A 685133359Sobrien0 string NITF National Imagery Transmission Format 686133359Sobrien>25 string >\0 dated %.14s 687133359Sobrien 688133359Sobrien# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) 689284778Sdelphij# Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> 690284778Sdelphij# See http://fileformats.archiveteam.org/wiki/GEM_Raster 691284778Sdelphij# For variations, also see: 692284778Sdelphij# http://www.seasip.info/Gem/ff_img.html (Ventura) 693284778Sdelphij# http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT) 694284778Sdelphij# http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) 695284778Sdelphij# http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) 696284778Sdelphij0 beshort 0x0001 697284778Sdelphij>2 beshort 0x0008 GEM Image data 698284778Sdelphij>>0 use gem_info 699284778Sdelphij>2 beshort 0x0009 GEM Image data (Ventura) 700284778Sdelphij>>0 use gem_info 701284778Sdelphij16 string XIMG\0 GEM XIMG Image data 702284778Sdelphij>0 use gem_info 703284778Sdelphij16 string STTT\0\x10 GEM STTT Image data 704284778Sdelphij>0 use gem_info 705284778Sdelphij16 string TIMG\0 GEM TIMG Image data 706284778Sdelphij>0 use gem_info 707284778Sdelphij 708284778Sdelphij0 name gem_info 709133359Sobrien>12 beshort x %d x 710133359Sobrien>14 beshort x %d, 711133359Sobrien>4 beshort x %d planes, 712133359Sobrien>8 beshort x %d x 713133359Sobrien>10 beshort x %d pixelsize 714133359Sobrien 715133359Sobrien# GEM Metafile (Wolfram Kleff) 716133359Sobrien0 lelong 0x0018FFFF GEM Metafile data 717133359Sobrien>4 leshort x version %d 718133359Sobrien 719133359Sobrien# 720133359Sobrien# SMJPEG. A custom Motion JPEG format used by Loki Entertainment 721133359Sobrien# Software Torbjorn Andersson <d91tan@Update.UU.SE>. 722133359Sobrien# 723133359Sobrien0 string \0\nSMJPEG SMJPEG 724133359Sobrien>8 belong x %d.x data 725133359Sobrien# According to the specification you could find any number of _TXT 726133359Sobrien# headers here, but I can't think of any way of handling that. None of 727133359Sobrien# the SMJPEG files I tried it on used this feature. Even if such a 728133359Sobrien# file is encountered the output should still be reasonable. 729133359Sobrien>16 string _SND \b, 730133359Sobrien>>24 beshort >0 %d Hz 731133359Sobrien>>26 byte 8 8-bit 732133359Sobrien>>26 byte 16 16-bit 733133359Sobrien>>28 string NONE uncompressed 734133359Sobrien# >>28 string APCM ADPCM compressed 735133359Sobrien>>27 byte 1 mono 736133359Sobrien>>28 byte 2 stereo 737133359Sobrien# Help! Isn't there any way to avoid writing this part twice? 738133359Sobrien>>32 string _VID \b, 739133359Sobrien# >>>48 string JFIF JPEG 740133359Sobrien>>>40 belong >0 %d frames 741133359Sobrien>>>44 beshort >0 (%d x 742133359Sobrien>>>46 beshort >0 %d) 743133359Sobrien>16 string _VID \b, 744133359Sobrien# >>32 string JFIF JPEG 745133359Sobrien>>24 belong >0 %d frames 746133359Sobrien>>28 beshort >0 (%d x 747133359Sobrien>>30 beshort >0 %d) 748133359Sobrien 749133359Sobrien0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File 750133359Sobrien 751133359Sobrien# "thumbnail file" (icon) 752133359Sobrien# descended from "xv", but in use by other applications as well (Wolfram Kleff) 753133359Sobrien0 string P7\ 332 XV "thumbnail file" (icon) data 754133359Sobrien 755133359Sobrien# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?) 756133359Sobrien0 string KiSS KISS/GS 757133359Sobrien>4 byte 16 color 758133359Sobrien>>5 byte x %d bit 759133359Sobrien>>8 leshort x %d colors 760133359Sobrien>>10 leshort x %d groups 761133359Sobrien>4 byte 32 cell 762133359Sobrien>>5 byte x %d bit 763133359Sobrien>>8 leshort x %d x 764133359Sobrien>>10 leshort x %d 765133359Sobrien>>12 leshort x +%d 766133359Sobrien>>14 leshort x +%d 767133359Sobrien 768133359Sobrien# Webshots (www.webshots.com), by John Harrison 769133359Sobrien0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file 770133359Sobrien 771133359Sobrien# Hercules DASD image files 772133359Sobrien# From Jan Jaeger <jj@septa.nl> 773133359Sobrien0 string CKD_P370 Hercules CKD DASD image file 774133359Sobrien>8 long x \b, %d heads per cylinder 775133359Sobrien>12 long x \b, track size %d bytes 776133359Sobrien>16 byte x \b, device type 33%2.2X 777133359Sobrien 778133359Sobrien0 string CKD_C370 Hercules compressed CKD DASD image file 779133359Sobrien>8 long x \b, %d heads per cylinder 780133359Sobrien>12 long x \b, track size %d bytes 781133359Sobrien>16 byte x \b, device type 33%2.2X 782133359Sobrien 783133359Sobrien0 string CKD_S370 Hercules CKD DASD shadow file 784133359Sobrien>8 long x \b, %d heads per cylinder 785133359Sobrien>12 long x \b, track size %d bytes 786133359Sobrien>16 byte x \b, device type 33%2.2X 787133359Sobrien 788186690Sobrien# Squeak images and programs - etoffi@softhome.net 789186690Sobrien0 string \146\031\0\0 Squeak image data 790186690Sobrien0 search/1 'From\040Squeak Squeak program text 791133359Sobrien 792133359Sobrien# partimage: file(1) magic for PartImage files (experimental, incomplete) 793133359Sobrien# Author: Hans-Joachim Baader <hjb@pro-linux.de> 794133359Sobrien0 string PaRtImAgE-VoLuMe PartImage 795133359Sobrien>0x0020 string 0.6.1 file version %s 796267843Sdelphij>>0x0060 lelong >-1 volume %d 797133359Sobrien#>>0x0064 8 byte identifier 798133359Sobrien#>>0x007c reserved 799133359Sobrien>>0x0200 string >\0 type %s 800133359Sobrien>>0x1400 string >\0 device %s, 801133359Sobrien>>0x1600 string >\0 original filename %s, 802133359Sobrien# Some fields omitted 803133359Sobrien>>0x2744 lelong 0 not compressed 804133359Sobrien>>0x2744 lelong 1 gzip compressed 805133359Sobrien>>0x2744 lelong 2 bzip2 compressed 806133359Sobrien>>0x2744 lelong >2 compressed with unknown algorithm 807133359Sobrien>0x0020 string >0.6.1 file version %s 808133359Sobrien>0x0020 string <0.6.1 file version %s 809133359Sobrien 810133359Sobrien# DCX is multi-page PCX, using a simple header of up to 1024 811133359Sobrien# offsets for the respective PCX components. 812133359Sobrien# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> 813133359Sobrien0 lelong 987654321 DCX multi-page PCX image data 814133359Sobrien 815133359Sobrien# Simon Walton <simonw@matteworld.com> 816133359Sobrien# Kodak Cineon format for scanned negatives 817133359Sobrien# http://www.kodak.com/US/en/motion/support/dlad/ 818133359Sobrien0 lelong 0xd75f2a80 Cineon image data 819267843Sdelphij>200 belong >0 \b, %d x 820267843Sdelphij>204 belong >0 %d 821133359Sobrien 822133359Sobrien 823133359Sobrien# Bio-Rad .PIC is an image format used by microscope control systems 824133359Sobrien# and related image processing software used by biologists. 825133359Sobrien# From: Vebjorn Ljosa <vebjorn@ljosa.com> 826226048Sobrien# BOOL values are two-byte integers; use them to rule out false positives. 827226048Sobrien# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt 828226048Sobrien# Samples: http://www.loci.wisc.edu/software/sample-data 829226048Sobrien14 leshort <2 830226048Sobrien>62 leshort <2 831226048Sobrien>>54 leshort 12345 Bio-Rad .PIC Image File 832267843Sdelphij>>>0 leshort >0 %d x 833267843Sdelphij>>>2 leshort >0 %d, 834226048Sobrien>>>4 leshort =1 1 image in file 835267843Sdelphij>>>4 leshort >1 %d images in file 836133359Sobrien 837133359Sobrien# From Jan "Yenya" Kasprzak <kas@fi.muni.cz> 838133359Sobrien# The description of *.mrw format can be found at 839133359Sobrien# http://www.dalibor.cz/minolta/raw_file_format.htm 840133359Sobrien0 string \000MRM Minolta Dimage camera raw image data 841133359Sobrien 842186690Sobrien# Summary: DjVu image / document 843186690Sobrien# Extension: .djvu 844186690Sobrien# Reference: http://djvu.org/docs/DjVu3Spec.djvu 845186690Sobrien# Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr> 846186690Sobrien# Modified by (1): Abel Cheung <abelcheung@gmail.com> 847186690Sobrien0 string AT&TFORM 848226048Sobrien>12 string DJVM DjVu multiple page document 849186690Sobrien!:mime image/vnd.djvu 850186690Sobrien>12 string DJVU DjVu image or single page document 851226048Sobrien!:mime image/vnd.djvu 852186690Sobrien>12 string DJVI DjVu shared document 853226048Sobrien!:mime image/vnd.djvu 854186690Sobrien>12 string THUM DjVu page thumbnails 855226048Sobrien!:mime image/vnd.djvu 856133359Sobrien 857267843Sdelphij# Originally by Marc Espie 858267843Sdelphij# Modified by Robert Minsk <robertminsk at yahoo.com> 859267843Sdelphij# http://www.openexr.com/openexrfilelayout.pdf 860267843Sdelphij0 lelong 20000630 OpenEXR image data, 861267843Sdelphij!:mime image/x-exr 862267843Sdelphij>4 lelong&0x000000ff x version %d, 863267843Sdelphij>4 lelong ^0x00000200 storage: scanline 864267843Sdelphij>4 lelong &0x00000200 storage: tiled 865267843Sdelphij>8 search/0x1000 compression\0 \b, compression: 866267843Sdelphij>>&16 byte 0 none 867267843Sdelphij>>&16 byte 1 rle 868267843Sdelphij>>&16 byte 2 zips 869267843Sdelphij>>&16 byte 3 zip 870267843Sdelphij>>&16 byte 4 piz 871267843Sdelphij>>&16 byte 5 pxr24 872267843Sdelphij>>&16 byte 6 b44 873267843Sdelphij>>&16 byte 7 b44a 874267843Sdelphij>>&16 byte >7 unknown 875267843Sdelphij>8 search/0x1000 dataWindow\0 \b, dataWindow: 876267843Sdelphij>>&10 lelong x (%d 877267843Sdelphij>>&14 lelong x %d)- 878267843Sdelphij>>&18 lelong x \b(%d 879267843Sdelphij>>&22 lelong x %d) 880267843Sdelphij>8 search/0x1000 displayWindow\0 \b, displayWindow: 881267843Sdelphij>>&10 lelong x (%d 882267843Sdelphij>>&14 lelong x %d)- 883267843Sdelphij>>&18 lelong x \b(%d 884267843Sdelphij>>&22 lelong x %d) 885267843Sdelphij>8 search/0x1000 lineOrder\0 \b, lineOrder: 886267843Sdelphij>>&14 byte 0 increasing y 887267843Sdelphij>>&14 byte 1 decreasing y 888267843Sdelphij>>&14 byte 2 random y 889267843Sdelphij>>&14 byte >2 unknown 890133359Sobrien 891267843Sdelphij# SMPTE Digital Picture Exchange Format, SMPTE DPX 892267843Sdelphij# 893267843Sdelphij# ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital 894267843Sdelphij# Moving-Picture Exchange (DPX), v1.0, 18 February 1994 895267843Sdelphij# Robert Minsk <robertminsk at yahoo.com> 896267843Sdelphij0 string SDPX DPX image data, big-endian, 897267843Sdelphij!:mime image/x-dpx 898267843Sdelphij>768 beshort <4 899267843Sdelphij>>772 belong x %dx 900267843Sdelphij>>776 belong x \b%d, 901267843Sdelphij>768 beshort >3 902267843Sdelphij>>776 belong x %dx 903267843Sdelphij>>772 belong x \b%d, 904267843Sdelphij>768 beshort 0 left to right/top to bottom 905267843Sdelphij>768 beshort 1 right to left/top to bottom 906267843Sdelphij>768 beshort 2 left to right/bottom to top 907267843Sdelphij>768 beshort 3 right to left/bottom to top 908267843Sdelphij>768 beshort 4 top to bottom/left to right 909267843Sdelphij>768 beshort 5 top to bottom/right to left 910267843Sdelphij>768 leshort 6 bottom to top/left to right 911267843Sdelphij>768 leshort 7 bottom to top/right to left 912133359Sobrien 913133359Sobrien# From: Tom Hilinski <tom.hilinski@comcast.net> 914133359Sobrien# http://www.unidata.ucar.edu/packages/netcdf/ 915159764Sobrien0 string CDF\001 NetCDF Data Format data 916159764Sobrien 917159764Sobrien#----------------------------------------------------------------------- 918159764Sobrien# Hierarchical Data Format, used to facilitate scientific data exchange 919159764Sobrien# specifications at http://hdf.ncsa.uiuc.edu/ 920159764Sobrien0 belong 0x0e031301 Hierarchical Data Format (version 4) data 921186690Sobrien!:mime application/x-hdf 922226048Sobrien0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data 923186690Sobrien!:mime application/x-hdf 924267843Sdelphij512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block 925267843Sdelphij!:mime application/x-hdf 926267843Sdelphij1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block 927267843Sdelphij!:mime application/x-hdf 928267843Sdelphij2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block 929267843Sdelphij!:mime application/x-hdf 930267843Sdelphij4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block 931267843Sdelphij!:mime application/x-hdf 932169942Sobrien 933267843Sdelphij 934169942Sobrien# From: Tobias Burnus <burnus@net-b.de> 935169942Sobrien# Xara (for a while: Corel Xara) is a graphic package, see 936186690Sobrien# http://www.xara.com/ for Windows and as GPL application for Linux 937169942Sobrien0 string XARA\243\243 Xara graphics file 938186690Sobrien 939186690Sobrien# http://www.cartesianinc.com/Tech/ 940186690Sobrien0 string CPC\262 Cartesian Perceptual Compression image 941186690Sobrien!:mime image/x-cpi 942186690Sobrien 943186690Sobrien# From Albert Cahalan <acahalan@gmail.com> 944186690Sobrien# puredigital used it for the CVS disposable camcorder 945186690Sobrien#8 lelong 4 ZBM bitmap image data 946186690Sobrien#>4 leshort x %u x 947186690Sobrien#>6 leshort x %u 948186690Sobrien 949186690Sobrien# From Albert Cahalan <acahalan@gmail.com> 950186690Sobrien# uncompressed 5:6:5 HighColor image for OLPC XO firmware icons 951186690Sobrien0 string C565 OLPC firmware icon image data 952186690Sobrien>4 leshort x %u x 953186690Sobrien>6 leshort x %u 954186690Sobrien 955186690Sobrien# Applied Images - Image files from Cytovision 956186690Sobrien# Gustavo Junior Alves <gjalves@gjalves.com.br> 957186690Sobrien0 string \xce\xda\xde\xfa Cytovision Metaphases file 958186690Sobrien0 string \xed\xad\xef\xac Cytovision Karyotype file 959186690Sobrien0 string \x0b\x00\x03\x00 Cytovision FISH Probe file 960186690Sobrien0 string \xed\xfe\xda\xbe Cytovision FLEX file 961186690Sobrien0 string \xed\xab\xed\xfe Cytovision FLEX file 962186690Sobrien0 string \xad\xfd\xea\xad Cytovision RATS file 963186690Sobrien 964186690Sobrien# Wavelet Scalar Quantization format used in gray-scale fingerprint images 965186690Sobrien# From Tano M Fotang <mfotang@quanteq.com> 966186690Sobrien0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data 967191736Sobrien 968267843Sdelphij# Type: PCO B16 image files 969267843Sdelphij# URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf 970267843Sdelphij# From: Florian Philipp <florian.philipp@binarywings.net> 971267843Sdelphij# Extension: .b16 972267843Sdelphij# Description: Pixel image format produced by PCO Camware, typically used 973267843Sdelphij# together with PCO cameras. 974267843Sdelphij# Note: Different versions exist for e.g. 8 bit and 16 bit images. 975267843Sdelphij# Documentation is incomplete. 976267843Sdelphij0 string/b PCO- PCO B16 image data 977267843Sdelphij>12 lelong x \b, %dx 978267843Sdelphij>16 lelong x \b%d 979267843Sdelphij>20 lelong 0 \b, short header 980267843Sdelphij>20 lelong -1 \b, extended header 981267843Sdelphij>>24 lelong 0 \b, grayscale 982267843Sdelphij>>>36 lelong 0 linear LUT 983267843Sdelphij>>>36 lelong 1 logarithmic LUT 984267843Sdelphij>>>28 lelong x [%d 985267843Sdelphij>>>32 lelong x \b,%d] 986267843Sdelphij>>24 lelong 1 \b, color 987267843Sdelphij>>>64 lelong 0 linear LUT 988267843Sdelphij>>>64 lelong 1 logarithmic LUT 989267843Sdelphij>>>40 lelong x r[%d 990267843Sdelphij>>>44 lelong x \b,%d] 991267843Sdelphij>>>48 lelong x g[%d 992267843Sdelphij>>>52 lelong x \b,%d] 993267843Sdelphij>>>56 lelong x b[%d 994267843Sdelphij>>>60 lelong x \b,%d] 995226048Sobrien 996267843Sdelphij# Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches 997267843Sdelphij# From: Markus Heidelberg <markus.heidelberg at web.de> 998267843Sdelphij0 string/t [BitmapInfo2] Polar Monitor Bitmap text 999267843Sdelphij!:mime image/x-polar-monitor-bitmap 1000267843Sdelphij 1001267843Sdelphij# From: Rick Richardson <rickrich@gmail.com> 1002226048Sobrien0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file 1003226048Sobrien 1004226048Sobrien# Type: Ulead Photo Explorer5 (.pe5) 1005226048Sobrien# URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) 1006226048Sobrien# From: Simon Horman <horms@debian.org> 1007226048Sobrien0 string IIO2H Ulead Photo Explorer5 1008226048Sobrien 1009226048Sobrien# Type: X11 cursor 1010226048Sobrien# URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup 1011226048Sobrien# From: Mathias Brodala <info@noctus.net> 1012226048Sobrien0 string Xcur X11 cursor 1013226048Sobrien 1014226048Sobrien# Type: Olympus ORF raw images. 1015226048Sobrien# URL: http://libopenraw.freedesktop.org/wiki/Olympus_ORF 1016226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1017226048Sobrien0 string MMOR Olympus ORF raw image data, big-endian 1018226048Sobrien!:mime image/x-olympus-orf 1019226048Sobrien0 string IIRO Olympus ORF raw image data, little-endian 1020226048Sobrien!:mime image/x-olympus-orf 1021226048Sobrien0 string IIRS Olympus ORF raw image data, little-endian 1022226048Sobrien!:mime image/x-olympus-orf 1023226048Sobrien 1024226048Sobrien# Type: files used in modern AVCHD camcoders to store clip information 1025226048Sobrien# Extension: .cpi 1026226048Sobrien# From: Alexander Danilov <alexander.a.danilov@gmail.com> 1027226048Sobrien0 string HDMV0100 AVCHD Clip Information 1028226048Sobrien 1029226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1030226048Sobrien# URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ 1031226048Sobrien# Radiance HDR; usually has .pic or .hdr extension. 1032226048Sobrien0 string #?RADIANCE\n Radiance HDR image data 1033226048Sobrien#!mime image/vnd.radiance 1034226048Sobrien 1035226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1036226048Sobrien# URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf 1037226048Sobrien# Used by the pfstools packages. The regex matches for the image size could 1038226048Sobrien# probably use some work. The MIME type is made up; if there's one in 1039226048Sobrien# actual common use, it should replace the one below. 1040226048Sobrien0 string PFS1\x0a PFS HDR image data 1041226048Sobrien#!mime image/x-pfs 1042226048Sobrien>1 regex [0-9]*\ \b, %s 1043226048Sobrien>>1 regex \ [0-9]{4} \bx%s 1044226048Sobrien 1045226048Sobrien# Type: Foveon X3F 1046226048Sobrien# URL: http://www.photofo.com/downloads/x3f-raw-format.pdf 1047226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1048226048Sobrien# Note that the MIME type isn't defined anywhere that I can find; if 1049226048Sobrien# there's a canonical type for this format, it should replace this one. 1050226048Sobrien0 string FOVb Foveon X3F raw image data 1051226048Sobrien!:mime image/x-x3f 1052226048Sobrien>6 leshort x \b, version %d. 1053226048Sobrien>4 leshort x \b%d 1054226048Sobrien>28 lelong x \b, %dx 1055226048Sobrien>32 lelong x \b%d 1056226048Sobrien 1057226048Sobrien# Paint.NET file 1058226048Sobrien# From Adam Buchbinder <adam.buchbinder@gmail.com> 1059226048Sobrien0 string PDN3 Paint.NET image data 1060226048Sobrien!:mime image/x-paintnet 1061226048Sobrien 1062226048Sobrien# Not really an image. 1063226048Sobrien# From: "Tano M. Fotang" <mfotang@quanteq.com> 1064226048Sobrien0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR) 1065267843Sdelphij 1066276415Sdelphij# doc: http://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip 1067276415Sdelphij# example: http://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip 1068276415Sdelphij90 bequad 0x574D50484F544F00 JPEG-XR Image 1069276415Sdelphij>98 byte&0x08 =0x08 \b, hard tiling 1070276415Sdelphij>99 byte&0x80 =0x80 \b, tiling present 1071276415Sdelphij>99 byte&0x40 =0x40 \b, codestream present 1072276415Sdelphij>99 byte&0x38 x \b, spatial xform= 1073276415Sdelphij>99 byte&0x38 0x00 \bTL 1074276415Sdelphij>99 byte&0x38 0x08 \bBL 1075276415Sdelphij>99 byte&0x38 0x10 \bTR 1076276415Sdelphij>99 byte&0x38 0x18 \bBR 1077276415Sdelphij>99 byte&0x38 0x20 \bBT 1078276415Sdelphij>99 byte&0x38 0x28 \bRB 1079276415Sdelphij>99 byte&0x38 0x30 \bLT 1080276415Sdelphij>99 byte&0x38 0x38 \bLB 1081276415Sdelphij>100 byte&0x80 =0x80 \b, short header 1082276415Sdelphij>>102 beshort+1 x \b, %d 1083276415Sdelphij>>104 beshort+1 x \bx%d 1084276415Sdelphij>100 byte&0x80 =0x00 \b, long header 1085276415Sdelphij>>102 belong+1 x \b, %x 1086276415Sdelphij>>106 belong+1 x \bx%x 1087276415Sdelphij>101 beshort&0xf x \b, bitdepth= 1088276415Sdelphij>>101 beshort&0xf 0x0 \b1-WHITE=1 1089276415Sdelphij>>101 beshort&0xf 0x1 \b8 1090276415Sdelphij>>101 beshort&0xf 0x2 \b16 1091276415Sdelphij>>101 beshort&0xf 0x3 \b16-SIGNED 1092276415Sdelphij>>101 beshort&0xf 0x4 \b16-FLOAT 1093276415Sdelphij>>101 beshort&0xf 0x5 \b(reserved 5) 1094276415Sdelphij>>101 beshort&0xf 0x6 \b32-SIGNED 1095276415Sdelphij>>101 beshort&0xf 0x7 \b32-FLOAT 1096276415Sdelphij>>101 beshort&0xf 0x8 \b5 1097276415Sdelphij>>101 beshort&0xf 0x9 \b10 1098276415Sdelphij>>101 beshort&0xf 0xa \b5-6-5 1099276415Sdelphij>>101 beshort&0xf 0xb \b(reserved %d) 1100276415Sdelphij>>101 beshort&0xf 0xc \b(reserved %d) 1101276415Sdelphij>>101 beshort&0xf 0xd \b(reserved %d) 1102276415Sdelphij>>101 beshort&0xf 0xe \b(reserved %d) 1103276415Sdelphij>>101 beshort&0xf 0xf \b1-BLACK=1 1104276415Sdelphij>101 beshort&0xf0 x \b, colorfmt= 1105276415Sdelphij>>101 beshort&0xf0 0x00 \bYONLY 1106276415Sdelphij>>101 beshort&0xf0 0x10 \bYUV240 1107276415Sdelphij>>101 beshort&0xf0 0x20 \bYWV422 1108276415Sdelphij>>101 beshort&0xf0 0x30 \bYWV444 1109276415Sdelphij>>101 beshort&0xf0 0x40 \bCMYK 1110276415Sdelphij>>101 beshort&0xf0 0x50 \bCMYKDIRECT 1111276415Sdelphij>>101 beshort&0xf0 0x60 \bNCOMPONENT 1112276415Sdelphij>>101 beshort&0xf0 0x70 \bRGB 1113276415Sdelphij>>101 beshort&0xf0 0x80 \bRGBE 1114276415Sdelphij>>101 beshort&0xf0 >0x80 \b(reserved 0x%x) 1115276415Sdelphij 1116276415Sdelphij# From: Johan van der Knijff <johan.vanderknijff@kb.nl> 1117276415Sdelphij# 1118276415Sdelphij# BPG (Better Portable Graphics) format 1119276415Sdelphij# http://bellard.org/bpg/ 1120276415Sdelphij# http://fileformats.archiveteam.org/wiki/BPG 1121276415Sdelphij# 1122276415Sdelphij0 string \x42\x50\x47\xFB BPG (Better Portable Graphics) 1123276415Sdelphij!:mime image/bpg 1124