images (267897) | images (275698) |
---|---|
1 2#------------------------------------------------------------------------------ | 1 2#------------------------------------------------------------------------------ |
3# $File: images,v 1.91 2014/04/30 21:41:02 christos Exp $ | 3# $File: images,v 1.97 2014/12/08 16:06:19 christos Exp $ |
4# images: file(1) magic for image formats (see also "iff", and "c-lang" for 5# XPM bitmaps) 6# 7# originally from jef@helios.ee.lbl.gov (Jef Poskanzer), 8# additions by janl@ifi.uio.no as well as others. Jan also suggested 9# merging several one- and two-line files into here. 10# 11# little magic: PCX (first byte is 0x0a) --- 98 unchanged lines hidden (view full) --- 110>10 byte x \b, version %d. 111>11 byte x \b%d 112 113# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) 114# The second word of TIFF files is the TIFF version number, 42, which has 115# never changed. The TIFF specification recommends testing for it. 1160 string MM\x00\x2a TIFF image data, big-endian 117!:mime image/tiff | 4# images: file(1) magic for image formats (see also "iff", and "c-lang" for 5# XPM bitmaps) 6# 7# originally from jef@helios.ee.lbl.gov (Jef Poskanzer), 8# additions by janl@ifi.uio.no as well as others. Jan also suggested 9# merging several one- and two-line files into here. 10# 11# little magic: PCX (first byte is 0x0a) --- 98 unchanged lines hidden (view full) --- 110>10 byte x \b, version %d. 111>11 byte x \b%d 112 113# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) 114# The second word of TIFF files is the TIFF version number, 42, which has 115# never changed. The TIFF specification recommends testing for it. 1160 string MM\x00\x2a TIFF image data, big-endian 117!:mime image/tiff |
118>(4.L) use tiff_ifd |
|
1180 string II\x2a\x00 TIFF image data, little-endian 119!:mime image/tiff | 1190 string II\x2a\x00 TIFF image data, little-endian 120!:mime image/tiff |
121>(4.l) use tiff_ifd |
|
120 | 122 |
1230 name tiff_ifd 124>0 leshort x \b, direntries=%d 125>2 use tiff_entry 126 1270 name tiff_entry 128>0 leshort 0x100 129>>4 lelong 1 130>>>12 use tiff_entry 131>>>8 lelong x \b, width=%d 132>0 leshort 0x101 133>>4 lelong 1 134>>>8 lelong x \b, height=%d 135>>>12 use tiff_entry 136>0 leshort 0x102 137>>8 lelong x \b, bps=%d 138>>12 use tiff_entry 139>0 leshort 0x103 140>>4 lelong 1 \b, compression= 141>>>8 lelong 1 \bnone 142>>>8 lelong 2 \bhuffman 143>>>8 lelong 3 \bbi-level group 3 144>>>8 lelong 4 \bbi-level group 4 145>>>8 lelong 5 \bLZW 146>>>8 lelong 6 \bJPEG (old) 147>>>8 lelong 7 \bJPEG 148>>>8 lelong 8 \bdeflate 149>>>8 lelong 9 \bJBIG, ITU-T T.85 150>>>8 lelong 0xa \bJBIG, ITU-T T.43 151>>>8 lelong 0x7ffe \bNeXT RLE 2-bit 152>>>8 lelong 0x8005 \bPackBits (Macintosh RLE) 153>>>8 lelong 0x8029 \bThunderscan RLE 154>>>8 lelong 0x807f \bRasterPadding (CT or MP) 155>>>8 lelong 0x8080 \bRLE (Line Work) 156>>>8 lelong 0x8081 \bRLE (High-Res Cont-Tone) 157>>>8 lelong 0x8082 \bRLE (Binary Line Work) 158>>>8 lelong 0x80b2 \bDeflate (PKZIP) 159>>>8 lelong 0x80b3 \bKodak DCS 160>>>8 lelong 0x8765 \bJBIG 161>>>8 lelong 0x8798 \bJPEG2000 162>>>8 lelong 0x8799 \bNikon NEF Compressed 163>>>8 default x 164>>>>8 lelong x \b(unknown 0x%x) 165>>>12 use tiff_entry 166>0 leshort 0x106 \b, PhotometricIntepretation= 167>>8 lelong 0 \bWhiteIsZero 168>>8 lelong 1 \bBlackIsZero 169>>8 lelong 2 \bRGB 170>>8 lelong 3 \bRGB Palette 171>>8 lelong 4 \bTransparency Mask 172>>8 lelong 5 \bCMYK 173>>8 lelong 6 \bYCbCr 174>>8 lelong 8 \bCIELab 175>>>8 lelong x \b(unknown=0x%x) 176>>12 use tiff_entry 177# FillOrder 178>0 leshort 0x10a 179>>4 lelong 1 180>>>12 use tiff_entry 181# DocumentName 182>0 leshort 0x10d 183>>(8.l) string x \b, name=%s 184>>>12 use tiff_entry 185# ImageDescription 186>0 leshort 0x10e 187>>(8.l) string x \b, description=%s 188>>>12 use tiff_entry 189# StripOffsets 190>0 leshort 0x111 191>>12 use tiff_entry 192# NewSubFileType 193>0 leshort 0xfe 194>>12 use tiff_entry 195# Datetime 196>0 leshort 0x132 197>>(8.l) string x \b, datetime=%s 198>>>12 use tiff_entry 199# HostComputer 200>0 leshort 0x13c 201>>(8.l) string x \b, hostcomputer=%s 202>>>12 use tiff_entry 203#>0 leshort x \b, unknown=0x%x 204 |
|
1210 string MM\x00\x2b Big TIFF image data, big-endian 122!:mime image/tiff 1230 string II\x2b\x00 Big TIFF image data, little-endian 124!:mime image/tiff 125 126# PNG [Portable Network Graphics, or "PNG's Not GIF"] images 127# (Greg Roelofs, newt@uchicago.edu) 128# (Albert Cahalan, acahalan@cs.uml.edu) --- 758 unchanged lines hidden (view full) --- 8870 string PDN3 Paint.NET image data 888!:mime image/x-paintnet 889 890# Not really an image. 891# From: "Tano M. Fotang" <mfotang@quanteq.com> 8920 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR) 893 894# WEBP https://developers.google.com/speed/webp/docs/riff_container | 2050 string MM\x00\x2b Big TIFF image data, big-endian 206!:mime image/tiff 2070 string II\x2b\x00 Big TIFF image data, little-endian 208!:mime image/tiff 209 210# PNG [Portable Network Graphics, or "PNG's Not GIF"] images 211# (Greg Roelofs, newt@uchicago.edu) 212# (Albert Cahalan, acahalan@cs.uml.edu) --- 758 unchanged lines hidden (view full) --- 9710 string PDN3 Paint.NET image data 972!:mime image/x-paintnet 973 974# Not really an image. 975# From: "Tano M. Fotang" <mfotang@quanteq.com> 9760 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR) 977 978# WEBP https://developers.google.com/speed/webp/docs/riff_container |
8950 string RIFF 896>8 string WEBP Web/P image data 897>>4 lelong x \b, %d bytes | 979#0 string RIFF 980#>8 string WEBP Web/P image data 981#>>4 lelong x \b, %d bytes 982 983# doc: http://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip 984# example: http://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip 98590 bequad 0x574D50484F544F00 JPEG-XR Image 986>98 byte&0x08 =0x08 \b, hard tiling 987>99 byte&0x80 =0x80 \b, tiling present 988>99 byte&0x40 =0x40 \b, codestream present 989>99 byte&0x38 x \b, spatial xform= 990>99 byte&0x38 0x00 \bTL 991>99 byte&0x38 0x08 \bBL 992>99 byte&0x38 0x10 \bTR 993>99 byte&0x38 0x18 \bBR 994>99 byte&0x38 0x20 \bBT 995>99 byte&0x38 0x28 \bRB 996>99 byte&0x38 0x30 \bLT 997>99 byte&0x38 0x38 \bLB 998>100 byte&0x80 =0x80 \b, short header 999>>102 beshort+1 x \b, %d 1000>>104 beshort+1 x \bx%d 1001>100 byte&0x80 =0x00 \b, long header 1002>>102 belong+1 x \b, %x 1003>>106 belong+1 x \bx%x 1004>101 beshort&0xf x \b, bitdepth= 1005>>101 beshort&0xf 0x0 \b1-WHITE=1 1006>>101 beshort&0xf 0x1 \b8 1007>>101 beshort&0xf 0x2 \b16 1008>>101 beshort&0xf 0x3 \b16-SIGNED 1009>>101 beshort&0xf 0x4 \b16-FLOAT 1010>>101 beshort&0xf 0x5 \b(reserved 5) 1011>>101 beshort&0xf 0x6 \b32-SIGNED 1012>>101 beshort&0xf 0x7 \b32-FLOAT 1013>>101 beshort&0xf 0x8 \b5 1014>>101 beshort&0xf 0x9 \b10 1015>>101 beshort&0xf 0xa \b5-6-5 1016>>101 beshort&0xf 0xb \b(reserved %d) 1017>>101 beshort&0xf 0xc \b(reserved %d) 1018>>101 beshort&0xf 0xd \b(reserved %d) 1019>>101 beshort&0xf 0xe \b(reserved %d) 1020>>101 beshort&0xf 0xf \b1-BLACK=1 1021>101 beshort&0xf0 x \b, colorfmt= 1022>>101 beshort&0xf0 0x00 \bYONLY 1023>>101 beshort&0xf0 0x10 \bYUV240 1024>>101 beshort&0xf0 0x20 \bYWV422 1025>>101 beshort&0xf0 0x30 \bYWV444 1026>>101 beshort&0xf0 0x40 \bCMYK 1027>>101 beshort&0xf0 0x50 \bCMYKDIRECT 1028>>101 beshort&0xf0 0x60 \bNCOMPONENT 1029>>101 beshort&0xf0 0x70 \bRGB 1030>>101 beshort&0xf0 0x80 \bRGBE 1031>>101 beshort&0xf0 >0x80 \b(reserved 0x%x) 1032 1033# From: Johan van der Knijff <johan.vanderknijff@kb.nl> 1034# 1035# BPG (Better Portable Graphics) format 1036# http://bellard.org/bpg/ 1037# http://fileformats.archiveteam.org/wiki/BPG 1038# 10390 string \x42\x50\x47\xFB BPG (Better Portable Graphics) 1040!:mime image/bpg |