images revision 300899
1118611Snjl 2118611Snjl#------------------------------------------------------------------------------ 3118611Snjl# $File: images,v 1.116 2016/03/23 15:29:20 christos Exp $ 4118611Snjl# images: file(1) magic for image formats (see also "iff", and "c-lang" for 5118611Snjl# XPM bitmaps) 6118611Snjl# 7217365Sjkim# originally from jef@helios.ee.lbl.gov (Jef Poskanzer), 8245582Sjkim# additions by janl@ifi.uio.no as well as others. Jan also suggested 9118611Snjl# merging several one- and two-line files into here. 10118611Snjl# 11217365Sjkim# little magic: PCX (first byte is 0x0a) 12217365Sjkim 13217365Sjkim# Targa - matches `povray', `ppmtotga' and `xv' outputs 14217365Sjkim# by Philippe De Muyter <phdm@macqel.be> 15217365Sjkim# URL: http://justsolve.archiveteam.org/wiki/TGA 16217365Sjkim# Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf 17217365Sjkim# Update: Joerg Jenderek 18217365Sjkim# at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 19217365Sjkim# ,32 or 33 (both not observed) 20217365Sjkim# at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise 21217365Sjkim# or theoretically 2-128 reserved for use by Truevision or 128-255 may be used for developer applications 22217365Sjkim# at 3, leshort Index is 0 for povray, ppmtotga and xv outputs 23217365Sjkim# `xv' recognizes only a subset of the following (RGB with pixelsize = 24) 24217365Sjkim# `tgatoppm' recognizes a superset (Index may be anything) 25118611Snjl# 26217365Sjkim# test of Color Map Type 0~no 1~color map 27217365Sjkim# and Image Type 1 2 3 9 10 11 32 33 28217365Sjkim# and Color Map Entry Size 0 15 16 24 32 29118611Snjl0 ubequad&0x00FeC400000000C0 0 30217365Sjkim# skip more garbage by looking for positive image type 31217365Sjkim>2 ubyte >0 32217365Sjkim# skip some compiled terminfo by looking for image type less equal 33 33217365Sjkim>>2 ubyte <34 34217365Sjkim# skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel sizes 15 16 24 32 35217365Sjkim>>>16 ubyte <33 36217365Sjkim# skip more by looking for pixel size 0Fh 10h 18h 20h 37217365Sjkim>>>>16 ubyte&0xC0 0x00 38217365Sjkim# skip 260-16.ico by looking for no color map 39217365Sjkim>>>>>1 ubyte 0 40217365Sjkim# implies no first map entry 41217365Sjkim>>>>>>3 uleshort 0 42217365Sjkim>>>>>>>0 use tga-image 43118611Snjl# Color Map 44118611Snjl>>>>>1 ubyte >0 45151937Sjkim>>>>>>0 use tga-image 46118611Snjl# display tga bitmap image information 47228110Sjkim0 name tga-image 48218590Sjkim>2 ubyte <34 Targa image data 49118611Snjl!:mime image/x-tga 50118611Snjl!:apple ????TPIC 51118611Snjl# normal extension .tga but some Truevision products used others: 52118611Snjl# tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that) 53151937Sjkim!:ext tga/tpic/icb/vda/vst 54118611Snjl# image type 1 2 3 9 10 11 32 33 55151937Sjkim>2 ubyte&0xF7 1 - Map 56151937Sjkim>2 ubyte&0xF7 2 - RGB 57151937Sjkim# alpha channel 58151937Sjkim>>17 ubyte&0x0F >0 \bA 59151937Sjkim>2 ubyte&0xF7 3 - Mono 60151937Sjkim# type not found, but by http://www.fileformat.info/format/tga/corion.htm 61151937Sjkim# Compressed color-mapped data, using Huffman, Delta, and runlength encoding 62151937Sjkim>2 ubyte 32 - Color 63151937Sjkim# Compressed color-mapped data, using Huffman, Delta, and RLE. 4-pass quadtree- type process 64118611Snjl>2 ubyte 33 - Color 65118611Snjl# Color Map Type 0~no 1~color map 66118611Snjl>1 ubyte 1 ( 67118611Snjl# first color map entry, 0 normal 68118611Snjl>>3 uleshort >0 \b%d- 69118611Snjl# color map length 0 2 1dh 3bh d9h 100h 70239340Sjkim>>5 uleshort x \b%d) 71118611Snjl# 8~run length encoding bit 72239340Sjkim>2 ubyte&0x08 8 - RLE 73118611Snjl# gimp can create big pictures! 74118611Snjl>12 uleshort >0 %d x 75118611Snjl>12 uleshort =0 65536 x 76118611Snjl# image height. 0 interpreted as 65536 77118611Snjl>14 uleshort >0 %d 78151937Sjkim>14 uleshort =0 65536 79151937Sjkim# Image Pixel Size 15 16 24 32 80151937Sjkim>16 ubyte x x %d 81118611Snjl# X origin of image. 0 normal 82118611Snjl>8 uleshort >0 +%d 83118611Snjl# Y origin of image. 0 normal; positive for top 84118611Snjl>10 uleshort >0 +%d 85151937Sjkim# Image descriptor: bits 3-0 give the alpha channel depth, bits 5-4 give direction 86151937Sjkim>17 ubyte&0x0F >0 - %d-bit alpha 87118611Snjl# bits 5-4 give direction. normal bottom left 88118611Snjl>17 ubyte &0x20 - top 89118611Snjl#>17 ubyte ^0x20 - bottom 90118611Snjl>17 ubyte &0x10 - right 91118611Snjl#>17 ubyte ^0x10 - left 92118611Snjl# some info say other bits 6-7 should be zero 93118611Snjl# but data storage interleave by http://www.fileformat.info/format/tga/corion.htm 94118611Snjl# 00 - no interleave;01 - even/odd interleave; 10 - four way interleave; 11 - reserved 95118611Snjl#>17 ubyte&0xC0 0x00 - no interleave 96118611Snjl>17 ubyte&0xC0 0x40 - interleave 97118611Snjl>17 ubyte&0xC0 0x80 - four way interleave 98118611Snjl>17 ubyte&0xC0 0xC0 - reserved 99118611Snjl# positive length implies identification field 100239340Sjkim>0 ubyte >0 101118611Snjl>>18 string x "%s" 102118611Snjl# last 18 bytes of newer tga file footer signature 103118611Snjl>18 search/4261301/s TRUEVISION-XFILE.\0 104118611Snjl# extension area offset if not 0 105118611Snjl>>&-8 ulelong >0 106118611Snjl# length of the extension area. normal 495 for version 2.0 107118611Snjl>>>(&-4.l) uleshort 0x01EF 108118611Snjl# AuthorName[41] 109118611Snjl>>>>&0 string >\0 - author "%-.40s" 110118611Snjl# Comment[324]=4 * 80 null terminated 111118611Snjl>>>>&41 string >\0 - comment "%-.80s" 112118611Snjl# date 113118611Snjl>>>>&365 ubequad&0xffffFFFFffff0000 !0 114118611Snjl# Day 115118611Snjl>>>>>&-6 uleshort x %d 116118611Snjl# Month 117118611Snjl>>>>>&-8 uleshort x \b-%d 118118611Snjl# Year 119118611Snjl>>>>>&-4 uleshort x \b-%d 120118611Snjl# time 121118611Snjl>>>>&371 ubequad&0xffffFFFFffff0000 !0 122118611Snjl# hour 123241973Sjkim>>>>>&-8 uleshort x %d 124118611Snjl# minutes 125118611Snjl>>>>>&-6 uleshort x \b:%.2d 126118611Snjl# second 127118611Snjl>>>>>&-4 uleshort x \b:%.2d 128118611Snjl# JobName[41] 129118611Snjl>>>>&377 string >\0 - job "%-.40s" 130118611Snjl# JobHour Jobminute Jobsecond 131118611Snjl>>>>&418 ubequad&0xffffFFFFffff0000 !0 132118611Snjl>>>>>&-8 uleshort x %d 133118611Snjl>>>>>&-6 uleshort x \b:%.2d 134118611Snjl>>>>>&-4 uleshort x \b:%.2d 135239340Sjkim# SoftwareId[41] 136118611Snjl>>>>&424 string >\0 - %-.40s 137118611Snjl# SoftwareVersionNumber 138118611Snjl>>>>&424 ubyte >0 139118611Snjl>>>>>&40 uleshort/100 x %d 140118611Snjl>>>>>&40 uleshort%100 x \b.%d 141118611Snjl# VersionLetter 142118611Snjl>>>>>&42 ubyte >0x20 \b%c 143118611Snjl# KeyColor 144118611Snjl>>>>&468 ulelong >0 - keycolor 0x%8.8x 145118611Snjl# Denominator of Pixel ratio. 0~no pixel aspect 146118611Snjl>>>>&474 uleshort >0 147118611Snjl# Numerator 148118611Snjl>>>>>&-4 uleshort >0 - aspect %d 149118611Snjl>>>>>&-2 uleshort x \b/%d 150118611Snjl# Denominator of Gamma ratio. 0~no Gamma value 151118611Snjl>>>>&478 uleshort >0 152118611Snjl# Numerator 153118611Snjl>>>>>&-4 uleshort >0 - gamma %d 154118611Snjl>>>>>&-2 uleshort x \b/%d 155118611Snjl# ColorOffset 156118611Snjl#>>>>&480 ulelong x - col offset 0x%8.8x 157118611Snjl# StampOffset 158239340Sjkim#>>>>&484 ulelong x - stamp offset 0x%8.8x 159118611Snjl# ScanOffset 160239340Sjkim#>>>>&488 ulelong x - scan offset 0x%8.8x 161118611Snjl# AttributesType 162118611Snjl#>>>>&492 ubyte x - Attributes 0x%x 163118611Snjl## EndOfTGA 164118611Snjl 165118611Snjl# PBMPLUS images 166118611Snjl# The next byte following the magic is always whitespace. 167118611Snjl# strength is changed to try these patterns before "x86 boot sector" 168118611Snjl0 name netpbm 169118611Snjl>3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm image data 170118611Snjl>>&0 regex =[0-9]{1,50} \b, size = %s x 171118611Snjl>>>&0 regex =[0-9]{1,50} \b %s 172118611Snjl 173241973Sjkim0 search/1 P1 174118611Snjl>0 use netpbm 175118611Snjl>>0 string x \b, bitmap 176118611Snjl!:strength + 45 177118611Snjl!:mime image/x-portable-bitmap 178118611Snjl 179118611Snjl0 search/1 P2 180118611Snjl>0 use netpbm 181118611Snjl>>0 string x \b, greymap 182118611Snjl!:strength + 45 183118611Snjl!:mime image/x-portable-greymap 184118611Snjl 185118611Snjl0 search/1 P3 186118611Snjl>0 use netpbm 187118611Snjl>>0 string x \b, pixmap 188250838Sjkim!:strength + 45 189239340Sjkim!:mime image/x-portable-pixmap 190118611Snjl 191118611Snjl0 string P4 192118611Snjl>0 use netpbm 193250838Sjkim>>0 string x \b, rawbits, bitmap 194239340Sjkim!:strength + 45 195118611Snjl!:mime image/x-portable-bitmap 196118611Snjl 197118611Snjl0 string P5 198250838Sjkim>0 use netpbm 199239340Sjkim>>0 string x \b, rawbits, greymap 200118611Snjl!:strength + 45 201118611Snjl!:mime image/x-portable-greymap 202239340Sjkim 203239340Sjkim0 string P6 204118611Snjl>0 use netpbm 205250838Sjkim>>0 string x \b, rawbits, pixmap 206239340Sjkim!:strength + 45 207118611Snjl!:mime image/x-portable-pixmap 208118611Snjl 209118611Snjl0 string P7 Netpbm PAM image file 210118611Snjl!:mime image/x-portable-pixmap 211118611Snjl 212118611Snjl# From: bryanh@giraffe-data.com (Bryan Henderson) 213118611Snjl0 string \117\072 Solitaire Image Recorder format 214118611Snjl>4 string \013 MGI Type 11 215118611Snjl>4 string \021 MGI Type 17 216118611Snjl0 string .MDA MicroDesign data 217118611Snjl>21 byte 48 version 2 218118611Snjl>21 byte 51 version 3 219118611Snjl0 string .MDP MicroDesign page data 220118611Snjl>21 byte 48 version 2 221250838Sjkim>21 byte 51 version 3 222239340Sjkim 223239340Sjkim# NIFF (Navy Interchange File Format, a modification of TIFF) images 224118611Snjl# [GRR: this *must* go before TIFF] 225118611Snjl0 string IIN1 NIFF image data 226118611Snjl!:mime image/x-niff 227250838Sjkim 228239340Sjkim# Canon RAW version 1 (CRW) files are a type of Canon Image File Format 229239340Sjkim# (CIFF) file. These are apparently all little-endian. 230118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 231118611Snjl# URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html 232118611Snjl0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data 233250838Sjkim!:mime image/x-canon-crw 234239340Sjkim>16 leshort x \b, version %d. 235239340Sjkim>14 leshort x \b%d 236118611Snjl 237118611Snjl# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic 238118611Snjl# number. Put this above the TIFF test to make sure we detect them. 239250838Sjkim# These are apparently all little-endian. 240118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 241250838Sjkim# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2 242118611Snjl0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data 243118611Snjl!:mime image/x-canon-cr2 244118611Snjl>10 byte x \b, version %d. 245241973Sjkim>11 byte x \b%d 246118611Snjl 247118611Snjl# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) 248118611Snjl# The second word of TIFF files is the TIFF version number, 42, which has 249118611Snjl# never changed. The TIFF specification recommends testing for it. 250118611Snjl0 string MM\x00\x2a TIFF image data, big-endian 251118611Snjl!:mime image/tiff 252118611Snjl>(4.L) use \^tiff_ifd 253118611Snjl0 string II\x2a\x00 TIFF image data, little-endian 254118611Snjl!:mime image/tiff 255151937Sjkim>(4.l) use tiff_ifd 256118611Snjl 257118611Snjl0 name tiff_ifd 258118611Snjl>0 leshort x \b, direntries=%d 259118611Snjl>2 use tiff_entry 260118611Snjl 261151937Sjkim0 name tiff_entry 262118611Snjl# NewSubFileType 263118611Snjl>0 leshort 0xfe 264118611Snjl>>12 use tiff_entry 265118611Snjl>0 leshort 0x100 266118611Snjl>>4 lelong 1 267118611Snjl>>>12 use tiff_entry 268118611Snjl>>>8 leshort x \b, width=%d 269250838Sjkim>0 leshort 0x101 270118611Snjl>>4 lelong 1 271118611Snjl>>>8 leshort x \b, height=%d 272118611Snjl>>>12 use tiff_entry 273250838Sjkim>0 leshort 0x102 274118611Snjl>>8 leshort x \b, bps=%d 275118611Snjl>>12 use tiff_entry 276118611Snjl>0 leshort 0x103 277250838Sjkim>>4 lelong 1 \b, compression= 278118611Snjl>>>8 leshort 1 \bnone 279118611Snjl>>>8 leshort 2 \bhuffman 280118611Snjl>>>8 leshort 3 \bbi-level group 3 281250838Sjkim>>>8 leshort 4 \bbi-level group 4 282118611Snjl>>>8 leshort 5 \bLZW 283118611Snjl>>>8 leshort 6 \bJPEG (old) 284118611Snjl>>>8 leshort 7 \bJPEG 285250838Sjkim>>>8 leshort 8 \bdeflate 286118611Snjl>>>8 leshort 9 \bJBIG, ITU-T T.85 287118611Snjl>>>8 leshort 0xa \bJBIG, ITU-T T.43 288118611Snjl>>>8 leshort 0x7ffe \bNeXT RLE 2-bit 289250838Sjkim>>>8 leshort 0x8005 \bPackBits (Macintosh RLE) 290118611Snjl>>>8 leshort 0x8029 \bThunderscan RLE 291118611Snjl>>>8 leshort 0x807f \bRasterPadding (CT or MP) 292118611Snjl>>>8 leshort 0x8080 \bRLE (Line Work) 293250838Sjkim>>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone) 294118611Snjl>>>8 leshort 0x8082 \bRLE (Binary Line Work) 295118611Snjl>>>8 leshort 0x80b2 \bDeflate (PKZIP) 296118611Snjl>>>8 leshort 0x80b3 \bKodak DCS 297250838Sjkim>>>8 leshort 0x8765 \bJBIG 298118611Snjl>>>8 leshort 0x8798 \bJPEG2000 299118611Snjl>>>8 leshort 0x8799 \bNikon NEF Compressed 300118611Snjl>>>8 default x 301250838Sjkim>>>>8 leshort x \b(unknown 0x%x) 302118611Snjl>>>12 use tiff_entry 303118611Snjl>0 leshort 0x106 \b, PhotometricIntepretation= 304118611Snjl>>8 clear x 305250838Sjkim>>8 leshort 0 \bWhiteIsZero 306118611Snjl>>8 leshort 1 \bBlackIsZero 307118611Snjl>>8 leshort 2 \bRGB 308118611Snjl>>8 leshort 3 \bRGB Palette 309250838Sjkim>>8 leshort 4 \bTransparency Mask 310118611Snjl>>8 leshort 5 \bCMYK 311118611Snjl>>8 leshort 6 \bYCbCr 312118611Snjl>>8 leshort 8 \bCIELab 313250838Sjkim>>8 default x 314118611Snjl>>>8 leshort x \b(unknown=0x%x) 315118611Snjl>>12 use tiff_entry 316118611Snjl# FillOrder 317250838Sjkim>0 leshort 0x10a 318118611Snjl>>4 lelong 1 319118611Snjl>>>12 use tiff_entry 320118611Snjl# DocumentName 321250838Sjkim>0 leshort 0x10d 322118611Snjl>>(8.l) string x \b, name=%s 323118611Snjl>>>12 use tiff_entry 324118611Snjl# ImageDescription 325250838Sjkim>0 leshort 0x10e 326118611Snjl>>(8.l) string x \b, description=%s 327118611Snjl>>>12 use tiff_entry 328118611Snjl# Make 329250838Sjkim>0 leshort 0x10f 330118611Snjl>>(8.l) string x \b, manufacturer=%s 331118611Snjl>>>12 use tiff_entry 332118611Snjl# Model 333250838Sjkim>0 leshort 0x110 334118611Snjl>>(8.l) string x \b, model=%s 335118611Snjl>>>12 use tiff_entry 336118611Snjl# StripOffsets 337118611Snjl>0 leshort 0x111 338118611Snjl>>12 use tiff_entry 339118611Snjl# Orientation 340118611Snjl>0 leshort 0x112 \b, orientation= 341118611Snjl>>8 leshort 1 \bupper-left 342118611Snjl>>8 leshort 3 \blower-right 343151937Sjkim>>8 leshort 6 \bupper-right 344118611Snjl>>8 leshort 8 \blower-left 345118611Snjl>>8 leshort 9 \bundefined 346151937Sjkim>>8 default x 347118611Snjl>>>8 leshort x \b[*%d*] 348239340Sjkim>>12 use tiff_entry 349118611Snjl# XResolution 350118611Snjl>0 leshort 0x11a 351118611Snjl>>8 lelong x \b, xresolution=%d 352118611Snjl>>12 use tiff_entry 353118611Snjl# YResolution 354118611Snjl>0 leshort 0x11b 355118611Snjl>>8 lelong x \b, yresolution=%d 356118611Snjl>>12 use tiff_entry 357118611Snjl# ResolutionUnit 358118611Snjl>0 leshort 0x128 359151937Sjkim>>8 leshort x \b, resolutionunit=%d 360151937Sjkim>>12 use tiff_entry 361118611Snjl# Software 362118611Snjl>0 leshort 0x131 363118611Snjl>>(8.l) string x \b, software=%s 364241973Sjkim>>12 use tiff_entry 365118611Snjl# Datetime 366118611Snjl>0 leshort 0x132 367118611Snjl>>(8.l) string x \b, datetime=%s 368239340Sjkim>>12 use tiff_entry 369239340Sjkim# HostComputer 370118611Snjl>0 leshort 0x13c 371239340Sjkim>>(8.l) string x \b, hostcomputer=%s 372239340Sjkim>>12 use tiff_entry 373239340Sjkim# WhitePoint 374239340Sjkim>0 leshort 0x13e 375239340Sjkim>>12 use tiff_entry 376239340Sjkim# PrimaryChromaticities 377239340Sjkim>0 leshort 0x13f 378239340Sjkim>>12 use tiff_entry 379239340Sjkim# YCbCrCoefficients 380239340Sjkim>0 leshort 0x211 381239340Sjkim>>12 use tiff_entry 382239340Sjkim# YCbCrPositioning 383239340Sjkim>0 leshort 0x213 384239340Sjkim>>12 use tiff_entry 385239340Sjkim# ReferenceBlackWhite 386239340Sjkim>0 leshort 0x214 387239340Sjkim>>12 use tiff_entry 388239340Sjkim# Copyright 389239340Sjkim>0 leshort 0x8298 390239340Sjkim>>(8.l) string x \b, copyright=%s 391239340Sjkim>>12 use tiff_entry 392239340Sjkim# ExifOffset 393239340Sjkim>0 leshort 0x8769 394239340Sjkim>>12 use tiff_entry 395239340Sjkim# GPS IFD 396239340Sjkim>0 leshort 0x8825 \b, GPS-Data 397239340Sjkim>>12 use tiff_entry 398241973Sjkim 399239340Sjkim#>0 leshort x \b, unknown=0x%x 400239340Sjkim#>>12 use tiff_entry 401239340Sjkim 402239340Sjkim0 string MM\x00\x2b Big TIFF image data, big-endian 403118611Snjl!:mime image/tiff 404118611Snjl0 string II\x2b\x00 Big TIFF image data, little-endian 405118611Snjl!:mime image/tiff 406118611Snjl 407118611Snjl# PNG [Portable Network Graphics, or "PNG's Not GIF"] images 408118611Snjl# (Greg Roelofs, newt@uchicago.edu) 409118611Snjl# (Albert Cahalan, acahalan@cs.uml.edu) 410118611Snjl# 411118611Snjl# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... 412118611Snjl# 413118611Snjl0 string \x89PNG\x0d\x0a\x1a\x0a PNG image data 414118611Snjl!:mime image/png 415118611Snjl>16 belong x \b, %d x 416118611Snjl>20 belong x %d, 417118611Snjl>24 byte x %d-bit 418118611Snjl>25 byte 0 grayscale, 419118611Snjl>25 byte 2 \b/color RGB, 420118611Snjl>25 byte 3 colormap, 421118611Snjl>25 byte 4 gray+alpha, 422118611Snjl>25 byte 6 \b/color RGBA, 423118611Snjl#>26 byte 0 deflate/32K, 424118611Snjl>28 byte 0 non-interlaced 425118611Snjl>28 byte 1 interlaced 426118611Snjl 427118611Snjl# possible GIF replacements; none yet released! 428118611Snjl# (Greg Roelofs, newt@uchicago.edu) 429118611Snjl# 430118611Snjl# GRR 950115: this was mine ("Zip GIF"): 431118611Snjl0 string GIF94z ZIF image (GIF+deflate alpha) 432118611Snjl!:mime image/x-unknown 433118611Snjl# 434118611Snjl# GRR 950115: this is Jeremy Wohl's Free Graphics Format (better): 435118611Snjl# 436118611Snjl0 string FGF95a FGF image (GIF+deflate beta) 437118611Snjl!:mime image/x-unknown 438118611Snjl# 439118611Snjl# GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal 440118611Snjl# (best; not yet implemented): 441118611Snjl# 442239340Sjkim0 string PBF PBF image (deflate compression) 443118611Snjl!:mime image/x-unknown 444118611Snjl 445118611Snjl# GIF 446118611Snjl0 string GIF8 GIF image data 447118611Snjl!:mime image/gif 448118611Snjl!:apple 8BIMGIFf 449118611Snjl>4 string 7a \b, version 8%s, 450118611Snjl>4 string 9a \b, version 8%s, 451118611Snjl>6 leshort >0 %d x 452118611Snjl>8 leshort >0 %d 453118611Snjl#>10 byte &0x80 color mapped, 454118611Snjl#>10 byte&0x07 =0x00 2 colors 455118611Snjl#>10 byte&0x07 =0x01 4 colors 456118611Snjl#>10 byte&0x07 =0x02 8 colors 457118611Snjl#>10 byte&0x07 =0x03 16 colors 458118611Snjl#>10 byte&0x07 =0x04 32 colors 459209746Sjkim#>10 byte&0x07 =0x05 64 colors 460167802Sjkim#>10 byte&0x07 =0x06 128 colors 461118611Snjl#>10 byte&0x07 =0x07 256 colors 462241973Sjkim 463118611Snjl# ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster, 464118611Snjl# 1 plane, no encoding. 465118611Snjl0 string \361\0\100\273 CMU window manager raster image data 466118611Snjl>4 lelong >0 %d x 467118611Snjl>8 lelong >0 %d, 468218590Sjkim>12 lelong >0 %d-bit 469218590Sjkim 470218590Sjkim# Magick Image File Format 471218590Sjkim0 string id=ImageMagick MIFF image data 472239340Sjkim 473218590Sjkim# Artisan 474218590Sjkim0 long 1123028772 Artisan image data 475218590Sjkim>4 long 1 \b, rectangular 24-bit 476218590Sjkim>4 long 2 \b, rectangular 8-bit with colormap 477218590Sjkim>4 long 3 \b, rectangular 32-bit (24-bit with matte) 478218590Sjkim 479218590Sjkim# FIG (Facility for Interactive Generation of figures), an object-based format 480218590Sjkim0 search/1 #FIG FIG image text 481218590Sjkim>5 string x \b, version %.3s 482218590Sjkim 483218590Sjkim# PHIGS 484218590Sjkim0 string ARF_BEGARF PHIGS clear text archive 485218590Sjkim0 string @(#)SunPHIGS SunPHIGS 486218590Sjkim# version number follows, in the form m.n 487218590Sjkim>40 string SunBin binary 488218590Sjkim>32 string archive archive 489218590Sjkim 490218590Sjkim# GKS (Graphics Kernel System) 491218590Sjkim0 string GKSM GKS Metafile 492228110Sjkim>24 string SunGKS \b, SunGKS 493228110Sjkim 494218590Sjkim# CGM image files 495218590Sjkim0 string BEGMF clear text Computer Graphics Metafile 496218590Sjkim 497218590Sjkim# MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de) 498218590Sjkim0 string yz MGR bitmap, modern format, 8-bit aligned 499250838Sjkim0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned 500218590Sjkim0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned 501218590Sjkim0 string yx MGR bitmap, modern format, squeezed 502218590Sjkim 503218590Sjkim# Fuzzy Bitmap (FBM) images 504228110Sjkim0 string %bitmap\0 FBM image data 505250838Sjkim>30 long 0x31 \b, mono 506218590Sjkim>30 long 0x33 \b, color 507218590Sjkim 508218590Sjkim# facsimile data 509218590Sjkim1 string PC\ Research,\ Inc group 3 fax data 510218590Sjkim>29 byte 0 \b, normal resolution (204x98 DPI) 511218590Sjkim>29 byte 1 \b, fine resolution (204x196 DPI) 512218590Sjkim# From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at> 513228110Sjkim0 string Sfff structured fax file 514250838Sjkim 515218590Sjkim# From: Joerg Jenderek <joerg.jen.der.ek@gmx.net> 516218590Sjkim# most files with the extension .EPA and some with .BMP 517228110Sjkim0 string \x11\x06 Award BIOS Logo, 136 x 84 518228110Sjkim!:mime image/x-award-bioslogo 519228110Sjkim0 string \x11\x09 Award BIOS Logo, 136 x 126 520228110Sjkim!:mime image/x-award-bioslogo 521228110Sjkim#0 string \x07\x1f BIOS Logo corrupted? 522228110Sjkim# http://www.blackfiveservices.co.uk/awbmtools.shtml 523228110Sjkim# http://biosgfx.narod.ru/v3/ 524228110Sjkim# http://biosgfx.narod.ru/abr-2/ 525250838Sjkim0 string AWBM 526228110Sjkim>4 leshort <1981 Award BIOS bitmap 527228110Sjkim!:mime image/x-award-bmp 528218590Sjkim# image width is a multiple of 4 529218590Sjkim>>4 leshort&0x0003 0 530218590Sjkim>>>4 leshort x \b, %d 531218590Sjkim>>>6 leshort x x %d 532218590Sjkim>>4 leshort&0x0003 >0 \b, 533218590Sjkim>>>4 leshort&0x0003 =1 534218590Sjkim>>>>4 leshort x %d+3 535218590Sjkim>>>4 leshort&0x0003 =2 536218590Sjkim>>>>4 leshort x %d+2 537218590Sjkim>>>4 leshort&0x0003 =3 538218590Sjkim>>>>4 leshort x %d+1 539218590Sjkim>>>6 leshort x x %d 540250838Sjkim# at offset 8 starts imagedata followed by "RGB " marker 541218590Sjkim 542218590Sjkim# PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) 543218590Sjkim# http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\ 544218590Sjkim# 28bitmap_information_header.29 545218590Sjkim0 string BM 546218590Sjkim>14 leshort 12 PC bitmap, OS/2 1.x format 547218590Sjkim!:mime image/x-ms-bmp 548218590Sjkim>>18 leshort x \b, %d x 549218590Sjkim>>20 leshort x %d 550218590Sjkim>14 leshort 64 PC bitmap, OS/2 2.x format 551218590Sjkim!:mime image/x-ms-bmp 552218590Sjkim>>18 leshort x \b, %d x 553218590Sjkim>>20 leshort x %d 554118611Snjl>14 leshort 40 PC bitmap, Windows 3.x format 555118611Snjl!:mime image/x-ms-bmp 556118611Snjl>>18 lelong x \b, %d x 557118611Snjl>>22 lelong x %d x 558118611Snjl>>28 leshort x %d 559239340Sjkim>14 leshort 124 PC bitmap, Windows 98/2000 and newer format 560118611Snjl!:mime image/x-ms-bmp 561118611Snjl>>18 lelong x \b, %d x 562118611Snjl>>22 lelong x %d x 563118611Snjl>>28 leshort x %d 564118611Snjl>14 leshort 108 PC bitmap, Windows 95/NT4 and newer format 565118611Snjl!:mime image/x-ms-bmp 566118611Snjl>>18 lelong x \b, %d x 567118611Snjl>>22 lelong x %d x 568118611Snjl>>28 leshort x %d 569202771Sjkim>14 leshort 128 PC bitmap, Windows NT/2000 format 570118611Snjl!:mime image/x-ms-bmp 571118611Snjl>>18 lelong x \b, %d x 572118611Snjl>>22 lelong x %d x 573118611Snjl>>28 leshort x %d 574118611Snjl# Too simple - MPi 575118611Snjl#0 string IC PC icon data 576118611Snjl#0 string PI PC pointer image data 577209746Sjkim#0 string CI PC color icon data 578167802Sjkim#0 string CP PC color pointer image data 579123315Snjl# Conflicts with other entries [BABYL] 580118611Snjl#0 string BA PC bitmap array data 581118611Snjl 582118611Snjl# XPM icons (Greg Roelofs, newt@uchicago.edu) 583118611Snjl0 search/1 /*\ XPM\ */ X pixmap image text 584118611Snjl!:mime image/x-xpmi 585250838Sjkim 586118611Snjl# Utah Raster Toolkit RLE images (janl@ifi.uio.no) 587118611Snjl0 leshort 0xcc52 RLE image data, 588118611Snjl>6 leshort x %d x 589118611Snjl>8 leshort x %d 590250838Sjkim>2 leshort >0 \b, lower left corner: %d 591118611Snjl>4 leshort >0 \b, lower right corner: %d 592118611Snjl>10 byte&0x1 =0x1 \b, clear first 593118611Snjl>10 byte&0x2 =0x2 \b, no background 594118611Snjl>10 byte&0x4 =0x4 \b, alpha channel 595250838Sjkim>10 byte&0x8 =0x8 \b, comment 596118611Snjl>11 byte >0 \b, %d color channels 597118611Snjl>12 byte >0 \b, %d bits per pixel 598118611Snjl>13 byte >0 \b, %d color map channels 599118611Snjl 600250838Sjkim# image file format (Robert Potter, potter@cs.rochester.edu) 601118611Snjl0 string Imagefile\ version- iff image data 602118611Snjl# this adds the whole header (inc. version number), informative but longish 603118611Snjl>10 string >\0 %s 604118611Snjl 605250838Sjkim# Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com) 606118611Snjl0 belong 0x59a66a95 Sun raster image data 607118611Snjl>4 belong >0 \b, %d x 608118611Snjl>8 belong >0 %d, 609118611Snjl>12 belong >0 %d-bit, 610250838Sjkim#>16 belong >0 %d bytes long, 611118611Snjl>20 belong 0 old format, 612118611Snjl#>20 belong 1 standard, 613118611Snjl>20 belong 2 compressed, 614118611Snjl>20 belong 3 RGB, 615250838Sjkim>20 belong 4 TIFF, 616118611Snjl>20 belong 5 IFF, 617118611Snjl>20 belong 0xffff reserved for testing, 618118611Snjl>24 belong 0 no colormap 619118611Snjl>24 belong 1 RGB colormap 620241973Sjkim>24 belong 2 raw colormap 621118611Snjl#>28 belong >0 colormap is %d bytes long 622118611Snjl 623118611Snjl# SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) 624118611Snjl# 625118611Snjl# See 626118611Snjl# http://reality.sgi.com/grafica/sgiimage.html 627118611Snjl# 628118611Snjl0 beshort 474 SGI image data 629118611Snjl#>2 byte 0 \b, verbatim 630118611Snjl>2 byte 1 \b, RLE 631239340Sjkim#>3 byte 1 \b, normal precision 632118611Snjl>3 byte 2 \b, high precision 633239340Sjkim>4 beshort x \b, %d-D 634118611Snjl>6 beshort x \b, %d x 635118611Snjl>8 beshort x %d 636118611Snjl>10 beshort x \b, %d channel 637118611Snjl>10 beshort !1 \bs 638118611Snjl>80 string >0 \b, "%s" 639118611Snjl 640118611Snjl0 string IT01 FIT image data 641118611Snjl>4 belong x \b, %d x 642118611Snjl>8 belong x %d x 643118611Snjl>12 belong x %d 644118611Snjl# 645118611Snjl0 string IT02 FIT image data 646118611Snjl>4 belong x \b, %d x 647118611Snjl>8 belong x %d x 648118611Snjl>12 belong x %d 649118611Snjl# 650118611Snjl2048 string PCD_IPI Kodak Photo CD image pack file 651118611Snjl>0xe02 byte&0x03 0x00 , landscape mode 652118611Snjl>0xe02 byte&0x03 0x01 , portrait mode 653118611Snjl>0xe02 byte&0x03 0x02 , landscape mode 654118611Snjl>0xe02 byte&0x03 0x03 , portrait mode 655118611Snjl0 string PCD_OPA Kodak Photo CD overview pack file 656118611Snjl 657118611Snjl# FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu> 658118611Snjl# FITS is the Flexible Image Transport System, the de facto standard for 659118611Snjl# data and image transfer, storage, etc., for the astronomical community. 660118611Snjl# (FITS floating point formats are big-endian.) 661209746Sjkim0 string SIMPLE\ \ = FITS image data 662167802Sjkim>109 string 8 \b, 8-bit, character or unsigned binary integer 663118611Snjl>108 string 16 \b, 16-bit, two's complement binary integer 664118611Snjl>107 string \ 32 \b, 32-bit, two's complement binary integer 665118611Snjl>107 string -32 \b, 32-bit, floating point, single precision 666118611Snjl>107 string -64 \b, 64-bit, floating point, double precision 667118611Snjl 668118611Snjl# other images 669250838Sjkim0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file 670118611Snjl 671118611Snjl# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image 672118611Snjl# stuff. 673118611Snjl# 674118611Snjl0 beshort 0x1010 PEX Binary Archive 675250838Sjkim 676118611Snjl# DICOM medical imaging data 677118611Snjl# URL: https://en.wikipedia.org/wiki/DICOM#Data_format 678118611Snjl# Note: "dcm" is the official file name extension 679118611Snjl# XnView mention also "dc3" and "acr" as file name extension 680250838Sjkim128 string DICM DICOM medical imaging data 681118611Snjl!:mime application/dicom 682118611Snjl!:ext dcm/dicom/dic 683118611Snjl 684118611Snjl# XWD - X Window Dump file. 685250838Sjkim# As described in /usr/X11R6/include/X11/XWDFile.h 686118611Snjl# used by the xwd program. 687250838Sjkim# Bradford Castalia, idaeim, 1/01 688118611Snjl# updated by Adam Buchbinder, 2/09 689118611Snjl# The following assumes version 7 of the format; the first long is the length 690118611Snjl# of the header, which is at least 25 4-byte longs, and the one at offset 8 691118611Snjl# is a constant which is always either 1 or 2. Offset 12 is the pixmap depth, 692118611Snjl# which is a maximum of 32. 693118611Snjl0 belong >100 694118611Snjl>8 belong <3 695118611Snjl>>12 belong <33 696118611Snjl>>>4 belong 7 XWD X Window Dump image data 697118611Snjl!:mime image/x-xwindowdump 698118611Snjl>>>>100 string >\0 \b, "%s" 699118611Snjl>>>>16 belong x \b, %dx 700118611Snjl>>>>20 belong x \b%dx 701118611Snjl>>>>12 belong x \b%d 702118611Snjl 703118611Snjl# PDS - Planetary Data System 704239340Sjkim# These files use Parameter Value Language in the header section. 705118611Snjl# Unfortunately, there is no certain magic, but the following 706118611Snjl# strings have been found to be most likely. 707118611Snjl0 string NJPL1I00 PDS (JPL) image data 708118611Snjl2 string NJPL1I PDS (JPL) image data 709118611Snjl0 string CCSD3ZF PDS (CCSD) image data 710118611Snjl2 string CCSD3Z PDS (CCSD) image data 711118611Snjl0 string PDS_ PDS image data 712118611Snjl0 string LBLSIZE= PDS (VICAR) image data 713118611Snjl 714118611Snjl# pM8x: ATARI STAD compressed bitmap format 715118611Snjl# 716118611Snjl# from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001 717118611Snjl# p M 8 5/6 xx yy zz data... 718118611Snjl# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed. 719118611Snjl# bytes either run horizontally (pM85) or vertically (pM86). yy is the 720118611Snjl# most frequent byte, xx and zz are runlength escape codes, where xx is 721118611Snjl# used for runs of yy. 722118611Snjl# 723118611Snjl0 string pM85 Atari ST STAD bitmap image data (hor) 724118611Snjl>5 byte 0x00 (white background) 725118611Snjl>5 byte 0xFF (black background) 726118611Snjl0 string pM86 Atari ST STAD bitmap image data (vert) 727118611Snjl>5 byte 0x00 (white background) 728118611Snjl>5 byte 0xFF (black background) 729118611Snjl 730118611Snjl# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu 731118611Snjl# http://www.atarimax.com/jindroush.atari.org/afmtatr.html 732118611Snjl0 leshort 0x0296 Atari ATR image 733118611Snjl 734118611Snjl# XXX: 735118611Snjl# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other 736118611Snjl# magic. 737118611Snjl# SGI RICE image file <mpruett@sgi.com> 738118611Snjl#0 beshort 0x5249 RICE image 739118611Snjl#>2 beshort x v%d 740118611Snjl#>4 beshort x (%d x 741118611Snjl#>6 beshort x %d) 742118611Snjl#>8 beshort 0 8 bit 743118611Snjl#>8 beshort 1 10 bit 744118611Snjl#>8 beshort 2 12 bit 745118611Snjl#>8 beshort 3 13 bit 746118611Snjl#>10 beshort 0 4:2:2 747241973Sjkim#>10 beshort 1 4:2:2:4 748118611Snjl#>10 beshort 2 4:4:4 749118611Snjl#>10 beshort 3 4:4:4:4 750118611Snjl#>12 beshort 1 RGB 751118611Snjl#>12 beshort 2 CCIR601 752118611Snjl#>12 beshort 3 RP175 753118611Snjl#>12 beshort 4 YUV 754118611Snjl 755118611Snjl# PCX image files 756118611Snjl# From: Dan Fandrich <dan@coneharvesters.com> 757118611Snjl# updated by Joerg Jenderek at Feb 2013 by http://de.wikipedia.org/wiki/PCX 758239340Sjkim# http://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt 759118611Snjl# GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000 760118611Snjl# 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 761118611Snjl0 ubelong&0xffF8fe00 0x0a000000 762118611Snjl# for PCX bit depth > 0 763118611Snjl>3 ubyte >0 764118611Snjl# test for valid versions 765118611Snjl>>1 ubyte <6 766118611Snjl>>>1 ubyte !1 PCX 767118611Snjl!:mime image/x-pcx 768118611Snjl#!:mime image/pcx 769118611Snjl>>>>1 ubyte 0 ver. 2.5 image data 770118611Snjl>>>>1 ubyte 2 ver. 2.8 image data, with palette 771118611Snjl>>>>1 ubyte 3 ver. 2.8 image data, without palette 772118611Snjl>>>>1 ubyte 4 for Windows image data 773118611Snjl>>>>1 ubyte 5 ver. 3.0 image data 774118611Snjl>>>>4 uleshort x bounding box [%d, 775118611Snjl>>>>6 uleshort x %d] - 776118611Snjl>>>>8 uleshort x [%d, 777118611Snjl>>>>10 uleshort x %d], 778118611Snjl>>>>65 ubyte >1 %d planes each of 779118611Snjl>>>>3 ubyte x %d-bit 780118611Snjl>>>>68 byte 1 colour, 781118611Snjl>>>>68 byte 2 grayscale, 782118611Snjl# this should not happen 783118611Snjl>>>>68 default x image, 784118611Snjl>>>>12 leshort >0 %d x 785209746Sjkim>>>>>14 uleshort x %d dpi, 786118611Snjl>>>>2 byte 0 uncompressed 787118611Snjl>>>>2 byte 1 RLE compressed 788118611Snjl 789118611Snjl# Adobe Photoshop 790118611Snjl# From: Asbjoern Sloth Toennesen <asbjorn@lila.io> 791118611Snjl0 string 8BPS Adobe Photoshop Image 792250838Sjkim!:mime image/vnd.adobe.photoshop 793118611Snjl>4 beshort 2 (PSB) 794118611Snjl>18 belong x \b, %d x 795118611Snjl>14 belong x %d, 796118611Snjl>24 beshort 0 bitmap 797118611Snjl>24 beshort 1 grayscale 798250838Sjkim>>12 beshort 2 with alpha 799118611Snjl>24 beshort 2 indexed 800118611Snjl>24 beshort 3 RGB 801118611Snjl>>12 beshort 4 \bA 802118611Snjl>24 beshort 4 CMYK 803250838Sjkim>>12 beshort 5 \bA 804118611Snjl>24 beshort 7 multichannel 805118611Snjl>24 beshort 8 duotone 806118611Snjl>24 beshort 9 lab 807118611Snjl>12 beshort > 1 808250838Sjkim>>12 beshort x \b, %dx 809118611Snjl>12 beshort 1 \b, 810250838Sjkim>22 beshort x %d-bit channel 811118611Snjl>12 beshort > 1 \bs 812118611Snjl 813118611Snjl# XV thumbnail indicator (ThMO) 814118611Snjl0 string P7\ 332 XV thumbnail image data 815118611Snjl 816118611Snjl# NITF is defined by United States MIL-STD-2500A 817118611Snjl0 string NITF National Imagery Transmission Format 818118611Snjl>25 string >\0 dated %.14s 819118611Snjl 820118611Snjl# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) 821118611Snjl# Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de> 822118611Snjl# Update: Joerg Jenderek 823118611Snjl# See http://fileformats.archiveteam.org/wiki/GEM_Raster 824151937Sjkim# For variations, also see: 825151937Sjkim# http://www.seasip.info/Gem/ff_img.html (Ventura) 826252279Sjkim# http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT) 827241973Sjkim# http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT) 828118611Snjl# http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG) 829118611Snjl0 beshort 0x0001 830118611Snjl# header_size 831118611Snjl>2 beshort 0x0008 832118611Snjl>>0 use gem_info 833118611Snjl>2 beshort 0x0009 834239340Sjkim>>0 use gem_info 835118611Snjl# no example for NOSIG 836118611Snjl>2 beshort 24 837118611Snjl>>0 use gem_info 838118611Snjl# no example for HYPERPAINT 839118611Snjl>2 beshort 25 840118611Snjl>>0 use gem_info 841118611Snjl16 string XIMG\0 842118611Snjl>0 use gem_info 843118611Snjl# no example 844118611Snjl16 string STTT\0\x10 845118611Snjl>0 use gem_info 846118611Snjl# no example or description 847118611Snjl16 string TIMG\0 848118611Snjl>0 use gem_info 849118611Snjl 850118611Snjl0 name gem_info 851118611Snjl# version is 2 for some XIMG and 1 for all others 852118611Snjl>0 beshort <0x0003 GEM 853118611Snjl# http://www.snowstone.org.uk/riscos/mimeman/mimemap.txt 854118611Snjl!:mime image/x-gem 855118611Snjl# header_size 24 25 27 59 779 words for colored bitmaps 856118611Snjl>>2 beshort >9 857118611Snjl>>>16 string STTT\0\x10 STTT 858118611Snjl>>>16 string TIMG\0 TIMG 859118611Snjl# HYPERPAINT or NOSIG variant 860118611Snjl>>>16 string \0\x80 861118611Snjl>>>>2 beshort =24 NOSIG 862118611Snjl>>>>2 beshort !24 HYPERPAINT 863118611Snjl# NOSIG or XIMG variant 864118611Snjl>>>16 default x 865118611Snjl>>>>16 string !XIMG\0 NOSIG 866118611Snjl>>16 string =XIMG\0 XIMG Image data 867118611Snjl!:ext img/ximg 868118611Snjl# to avoid Warning: Current entry does not yet have a description for adding a EXTENSION type 869118611Snjl>>16 string !XIMG\0 Image data 870118611Snjl!:ext img 871118611Snjl# header_size is 9 for Ventura files and 8 for other GEM Paint files 872118611Snjl>>2 beshort 9 (Ventura) 873252279Sjkim#>>2 beshort 8 (Paint) 874118611Snjl>>12 beshort x %d x 875118611Snjl>>14 beshort x %d, 876241973Sjkim# 1 4 8 877118611Snjl>>4 beshort x %d planes, 878118611Snjl# in tenths of a millimetre 879118611Snjl>>8 beshort x %d x 880118611Snjl>>10 beshort x %d pixelsize 881118611Snjl# pattern_size 1-8. 2 for GEM Paint 882118611Snjl>>6 beshort !2 \b, pattern size %d 883118611Snjl 884118611Snjl# GEM Metafile (Wolfram Kleff) 885118611Snjl0 lelong 0x0018FFFF GEM Metafile data 886118611Snjl>4 leshort x version %d 887118611Snjl 888118611Snjl# 889239340Sjkim# SMJPEG. A custom Motion JPEG format used by Loki Entertainment 890118611Snjl# Software Torbjorn Andersson <d91tan@Update.UU.SE>. 891118611Snjl# 892118611Snjl0 string \0\nSMJPEG SMJPEG 893118611Snjl>8 belong x %d.x data 894118611Snjl# According to the specification you could find any number of _TXT 895118611Snjl# headers here, but I can't think of any way of handling that. None of 896118611Snjl# the SMJPEG files I tried it on used this feature. Even if such a 897118611Snjl# file is encountered the output should still be reasonable. 898118611Snjl>16 string _SND \b, 899118611Snjl>>24 beshort >0 %d Hz 900118611Snjl>>26 byte 8 8-bit 901118611Snjl>>26 byte 16 16-bit 902118611Snjl>>28 string NONE uncompressed 903118611Snjl# >>28 string APCM ADPCM compressed 904118611Snjl>>27 byte 1 mono 905118611Snjl>>28 byte 2 stereo 906118611Snjl# Help! Isn't there any way to avoid writing this part twice? 907118611Snjl>>32 string _VID \b, 908118611Snjl# >>>48 string JFIF JPEG 909118611Snjl>>>40 belong >0 %d frames 910241973Sjkim>>>44 beshort >0 (%d x 911118611Snjl>>>46 beshort >0 %d) 912118611Snjl>16 string _VID \b, 913118611Snjl# >>32 string JFIF JPEG 914118611Snjl>>24 belong >0 %d frames 915118611Snjl>>28 beshort >0 (%d x 916118611Snjl>>30 beshort >0 %d) 917241973Sjkim 918118611Snjl0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File 919118611Snjl 920118611Snjl# "thumbnail file" (icon) 921118611Snjl# descended from "xv", but in use by other applications as well (Wolfram Kleff) 922241973Sjkim0 string P7\ 332 XV "thumbnail file" (icon) data 923118611Snjl 924118611Snjl# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?) 925118611Snjl0 string KiSS KISS/GS 926118611Snjl>4 byte 16 color 927118611Snjl>>5 byte x %d bit 928151937Sjkim>>8 leshort x %d colors 929151937Sjkim>>10 leshort x %d groups 930151937Sjkim>4 byte 32 cell 931151937Sjkim>>5 byte x %d bit 932241973Sjkim>>8 leshort x %d x 933118611Snjl>>10 leshort x %d 934118611Snjl>>12 leshort x +%d 935118611Snjl>>14 leshort x +%d 936118611Snjl 937118611Snjl# Webshots (www.webshots.com), by John Harrison 938118611Snjl0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file 939118611Snjl 940118611Snjl# Hercules DASD image files 941118611Snjl# From Jan Jaeger <jj@septa.nl> 942118611Snjl0 string CKD_P370 Hercules CKD DASD image file 943118611Snjl>8 long x \b, %d heads per cylinder 944118611Snjl>12 long x \b, track size %d bytes 945118611Snjl>16 byte x \b, device type 33%2.2X 946118611Snjl 947118611Snjl0 string CKD_C370 Hercules compressed CKD DASD image file 948118611Snjl>8 long x \b, %d heads per cylinder 949241973Sjkim>12 long x \b, track size %d bytes 950118611Snjl>16 byte x \b, device type 33%2.2X 951118611Snjl 952118611Snjl0 string CKD_S370 Hercules CKD DASD shadow file 953118611Snjl>8 long x \b, %d heads per cylinder 954118611Snjl>12 long x \b, track size %d bytes 955118611Snjl>16 byte x \b, device type 33%2.2X 956118611Snjl 957118611Snjl# Squeak images and programs - etoffi@softhome.net 958118611Snjl0 string \146\031\0\0 Squeak image data 959118611Snjl0 search/1 'From\040Squeak Squeak program text 960118611Snjl 961118611Snjl# partimage: file(1) magic for PartImage files (experimental, incomplete) 962118611Snjl# Author: Hans-Joachim Baader <hjb@pro-linux.de> 963118611Snjl0 string PaRtImAgE-VoLuMe PartImage 964118611Snjl>0x0020 string 0.6.1 file version %s 965118611Snjl>>0x0060 lelong >-1 volume %d 966118611Snjl#>>0x0064 8 byte identifier 967118611Snjl#>>0x007c reserved 968118611Snjl>>0x0200 string >\0 type %s 969118611Snjl>>0x1400 string >\0 device %s, 970118611Snjl>>0x1600 string >\0 original filename %s, 971118611Snjl# Some fields omitted 972118611Snjl>>0x2744 lelong 0 not compressed 973118611Snjl>>0x2744 lelong 1 gzip compressed 974118611Snjl>>0x2744 lelong 2 bzip2 compressed 975118611Snjl>>0x2744 lelong >2 compressed with unknown algorithm 976118611Snjl>0x0020 string >0.6.1 file version %s 977118611Snjl>0x0020 string <0.6.1 file version %s 978118611Snjl 979209746Sjkim# DCX is multi-page PCX, using a simple header of up to 1024 980118611Snjl# offsets for the respective PCX components. 981118611Snjl# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> 982118611Snjl0 lelong 987654321 DCX multi-page PCX image data 983118611Snjl 984118611Snjl# Simon Walton <simonw@matteworld.com> 985118611Snjl# Kodak Cineon format for scanned negatives 986118611Snjl# http://www.kodak.com/US/en/motion/support/dlad/ 987118611Snjl0 lelong 0xd75f2a80 Cineon image data 988118611Snjl>200 belong >0 \b, %d x 989118611Snjl>204 belong >0 %d 990209746Sjkim 991118611Snjl 992118611Snjl# Bio-Rad .PIC is an image format used by microscope control systems 993118611Snjl# and related image processing software used by biologists. 994118611Snjl# From: Vebjorn Ljosa <vebjorn@ljosa.com> 995118611Snjl# BOOL values are two-byte integers; use them to rule out false positives. 996118611Snjl# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt 997118611Snjl# Samples: http://www.loci.wisc.edu/software/sample-data 998118611Snjl14 leshort <2 999118611Snjl>62 leshort <2 1000118611Snjl>>54 leshort 12345 Bio-Rad .PIC Image File 1001118611Snjl>>>0 leshort >0 %d x 1002118611Snjl>>>2 leshort >0 %d, 1003118611Snjl>>>4 leshort =1 1 image in file 1004118611Snjl>>>4 leshort >1 %d images in file 1005118611Snjl 1006118611Snjl# From Jan "Yenya" Kasprzak <kas@fi.muni.cz> 1007118611Snjl# The description of *.mrw format can be found at 1008118611Snjl# http://www.dalibor.cz/minolta/raw_file_format.htm 1009118611Snjl0 string \000MRM Minolta Dimage camera raw image data 1010193529Sjkim 1011118611Snjl# Summary: DjVu image / document 1012118611Snjl# Extension: .djvu 1013118611Snjl# Reference: http://djvu.org/docs/DjVu3Spec.djvu 1014118611Snjl# Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr> 1015118611Snjl# Modified by (1): Abel Cheung <abelcheung@gmail.com> 1016118611Snjl0 string AT&TFORM 1017118611Snjl>12 string DJVM DjVu multiple page document 1018118611Snjl!:mime image/vnd.djvu 1019118611Snjl>12 string DJVU DjVu image or single page document 1020118611Snjl!:mime image/vnd.djvu 1021118611Snjl>12 string DJVI DjVu shared document 1022118611Snjl!:mime image/vnd.djvu 1023118611Snjl>12 string THUM DjVu page thumbnails 1024118611Snjl!:mime image/vnd.djvu 1025118611Snjl 1026118611Snjl# Originally by Marc Espie 1027118611Snjl# Modified by Robert Minsk <robertminsk at yahoo.com> 1028118611Snjl# http://www.openexr.com/openexrfilelayout.pdf 1029118611Snjl0 lelong 20000630 OpenEXR image data, 1030118611Snjl!:mime image/x-exr 1031118611Snjl>4 lelong&0x000000ff x version %d, 1032118611Snjl>4 lelong ^0x00000200 storage: scanline 1033118611Snjl>4 lelong &0x00000200 storage: tiled 1034118611Snjl>8 search/0x1000 compression\0 \b, compression: 1035118611Snjl>>&16 byte 0 none 1036118611Snjl>>&16 byte 1 rle 1037118611Snjl>>&16 byte 2 zips 1038118611Snjl>>&16 byte 3 zip 1039118611Snjl>>&16 byte 4 piz 1040118611Snjl>>&16 byte 5 pxr24 1041118611Snjl>>&16 byte 6 b44 1042118611Snjl>>&16 byte 7 b44a 1043118611Snjl>>&16 byte >7 unknown 1044118611Snjl>8 search/0x1000 dataWindow\0 \b, dataWindow: 1045241973Sjkim>>&10 lelong x (%d 1046118611Snjl>>&14 lelong x %d)- 1047118611Snjl>>&18 lelong x \b(%d 1048118611Snjl>>&22 lelong x %d) 1049118611Snjl>8 search/0x1000 displayWindow\0 \b, displayWindow: 1050118611Snjl>>&10 lelong x (%d 1051118611Snjl>>&14 lelong x %d)- 1052118611Snjl>>&18 lelong x \b(%d 1053118611Snjl>>&22 lelong x %d) 1054118611Snjl>8 search/0x1000 lineOrder\0 \b, lineOrder: 1055118611Snjl>>&14 byte 0 increasing y 1056118611Snjl>>&14 byte 1 decreasing y 1057118611Snjl>>&14 byte 2 random y 1058118611Snjl>>&14 byte >2 unknown 1059241973Sjkim 1060118611Snjl# SMPTE Digital Picture Exchange Format, SMPTE DPX 1061118611Snjl# 1062118611Snjl# ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital 1063118611Snjl# Moving-Picture Exchange (DPX), v1.0, 18 February 1994 1064118611Snjl# Robert Minsk <robertminsk at yahoo.com> 1065118611Snjl0 string SDPX DPX image data, big-endian, 1066118611Snjl!:mime image/x-dpx 1067118611Snjl>768 beshort <4 1068118611Snjl>>772 belong x %dx 1069118611Snjl>>776 belong x \b%d, 1070118611Snjl>768 beshort >3 1071118611Snjl>>776 belong x %dx 1072118611Snjl>>772 belong x \b%d, 1073118611Snjl>768 beshort 0 left to right/top to bottom 1074118611Snjl>768 beshort 1 right to left/top to bottom 1075118611Snjl>768 beshort 2 left to right/bottom to top 1076118611Snjl>768 beshort 3 right to left/bottom to top 1077118611Snjl>768 beshort 4 top to bottom/left to right 1078118611Snjl>768 beshort 5 top to bottom/right to left 1079118611Snjl>768 leshort 6 bottom to top/left to right 1080118611Snjl>768 leshort 7 bottom to top/right to left 1081118611Snjl 1082118611Snjl# From: Tom Hilinski <tom.hilinski@comcast.net> 1083118611Snjl# http://www.unidata.ucar.edu/packages/netcdf/ 1084118611Snjl0 string CDF\001 NetCDF Data Format data 1085118611Snjl 1086118611Snjl#----------------------------------------------------------------------- 1087118611Snjl# Hierarchical Data Format, used to facilitate scientific data exchange 1088118611Snjl# specifications at http://hdf.ncsa.uiuc.edu/ 1089118611Snjl0 belong 0x0e031301 Hierarchical Data Format (version 4) data 1090118611Snjl!:mime application/x-hdf 1091118611Snjl0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data 1092118611Snjl!:mime application/x-hdf 1093118611Snjl512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block 1094118611Snjl!:mime application/x-hdf 1095118611Snjl1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block 1096118611Snjl!:mime application/x-hdf 1097118611Snjl2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block 1098118611Snjl!:mime application/x-hdf 1099118611Snjl4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block 1100118611Snjl!:mime application/x-hdf 1101118611Snjl 1102118611Snjl 1103118611Snjl# From: Tobias Burnus <burnus@net-b.de> 1104118611Snjl# Xara (for a while: Corel Xara) is a graphic package, see 1105118611Snjl# http://www.xara.com/ for Windows and as GPL application for Linux 1106118611Snjl0 string XARA\243\243 Xara graphics file 1107118611Snjl 1108151937Sjkim# http://www.cartesianinc.com/Tech/ 1109151937Sjkim0 string CPC\262 Cartesian Perceptual Compression image 1110118611Snjl!:mime image/x-cpi 1111118611Snjl 1112118611Snjl# From Albert Cahalan <acahalan@gmail.com> 1113118611Snjl# puredigital used it for the CVS disposable camcorder 1114118611Snjl#8 lelong 4 ZBM bitmap image data 1115118611Snjl#>4 leshort x %u x 1116118611Snjl#>6 leshort x %u 1117118611Snjl 1118118611Snjl# From Albert Cahalan <acahalan@gmail.com> 1119118611Snjl# uncompressed 5:6:5 HighColor image for OLPC XO firmware icons 1120118611Snjl0 string C565 OLPC firmware icon image data 1121118611Snjl>4 leshort x %u x 1122118611Snjl>6 leshort x %u 1123118611Snjl 1124118611Snjl# Applied Images - Image files from Cytovision 1125118611Snjl# Gustavo Junior Alves <gjalves@gjalves.com.br> 1126118611Snjl0 string \xce\xda\xde\xfa Cytovision Metaphases file 1127118611Snjl0 string \xed\xad\xef\xac Cytovision Karyotype file 1128118611Snjl0 string \x0b\x00\x03\x00 Cytovision FISH Probe file 1129118611Snjl0 string \xed\xfe\xda\xbe Cytovision FLEX file 1130118611Snjl0 string \xed\xab\xed\xfe Cytovision FLEX file 1131118611Snjl0 string \xad\xfd\xea\xad Cytovision RATS file 1132118611Snjl 1133118611Snjl# Wavelet Scalar Quantization format used in gray-scale fingerprint images 1134118611Snjl# From Tano M Fotang <mfotang@quanteq.com> 1135118611Snjl0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data 1136118611Snjl 1137118611Snjl# Type: PCO B16 image files 1138118611Snjl# URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf 1139118611Snjl# From: Florian Philipp <florian.philipp@binarywings.net> 1140118611Snjl# Extension: .b16 1141118611Snjl# Description: Pixel image format produced by PCO Camware, typically used 1142118611Snjl# together with PCO cameras. 1143118611Snjl# Note: Different versions exist for e.g. 8 bit and 16 bit images. 1144118611Snjl# Documentation is incomplete. 1145118611Snjl0 string/b PCO- PCO B16 image data 1146118611Snjl>12 lelong x \b, %dx 1147118611Snjl>16 lelong x \b%d 1148118611Snjl>20 lelong 0 \b, short header 1149118611Snjl>20 lelong -1 \b, extended header 1150118611Snjl>>24 lelong 0 \b, grayscale 1151118611Snjl>>>36 lelong 0 linear LUT 1152118611Snjl>>>36 lelong 1 logarithmic LUT 1153118611Snjl>>>28 lelong x [%d 1154118611Snjl>>>32 lelong x \b,%d] 1155118611Snjl>>24 lelong 1 \b, color 1156118611Snjl>>>64 lelong 0 linear LUT 1157118611Snjl>>>64 lelong 1 logarithmic LUT 1158118611Snjl>>>40 lelong x r[%d 1159118611Snjl>>>44 lelong x \b,%d] 1160118611Snjl>>>48 lelong x g[%d 1161118611Snjl>>>52 lelong x \b,%d] 1162118611Snjl>>>56 lelong x b[%d 1163118611Snjl>>>60 lelong x \b,%d] 1164118611Snjl 1165118611Snjl# Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches 1166118611Snjl# From: Markus Heidelberg <markus.heidelberg at web.de> 1167151937Sjkim0 string/t [BitmapInfo2] Polar Monitor Bitmap text 1168151937Sjkim!:mime image/x-polar-monitor-bitmap 1169118611Snjl 1170118611Snjl# From: Rick Richardson <rickrich@gmail.com> 1171118611Snjl# updated by: Joerg Jenderek 1172118611Snjl# URL: http://techmods.net/nuvi/ 1173118611Snjl0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file 1174118611Snjl# extension is also used for 1175118611Snjl# Sony SRF raw image (image/x-sony-srf) 1176118611Snjl# SRF map 1177118611Snjl# Terragen Surface Map (http://www.planetside.co.uk/terragen) 1178118611Snjl# FileLocator Pro search criteria file (http://www.mythicsoft.com/filelocatorpro) 1179118611Snjl!:ext srf 1180118611Snjl#!:mime image/x-garmin-srf 1181118611Snjl# version 1.00,2.00,2.10,2.40,2.50 1182118611Snjl>0x2f string >0 \b, version %4.4s 1183118611Snjl# width (2880,2881,3240) 1184118611Snjl>0x55 uleshort >0 \b, %dx 1185118611Snjl# height (80,90) 1186118611Snjl>>0x53 uleshort x \b%d 1187118611Snjl 1188118611Snjl# Type: Ulead Photo Explorer5 (.pe5) 1189118611Snjl# URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese) 1190118611Snjl# From: Simon Horman <horms@debian.org> 1191118611Snjl0 string IIO2H Ulead Photo Explorer5 1192118611Snjl 1193118611Snjl# Type: X11 cursor 1194118611Snjl# URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup 1195118611Snjl# From: Mathias Brodala <info@noctus.net> 1196118611Snjl0 string Xcur X11 cursor 1197118611Snjl 1198118611Snjl# Type: Olympus ORF raw images. 1199118611Snjl# URL: http://libopenraw.freedesktop.org/wiki/Olympus_ORF 1200118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1201118611Snjl0 string MMOR Olympus ORF raw image data, big-endian 1202118611Snjl!:mime image/x-olympus-orf 1203118611Snjl0 string IIRO Olympus ORF raw image data, little-endian 1204118611Snjl!:mime image/x-olympus-orf 1205118611Snjl0 string IIRS Olympus ORF raw image data, little-endian 1206118611Snjl!:mime image/x-olympus-orf 1207118611Snjl 1208118611Snjl# Type: files used in modern AVCHD camcoders to store clip information 1209118611Snjl# Extension: .cpi 1210118611Snjl# From: Alexander Danilov <alexander.a.danilov@gmail.com> 1211118611Snjl0 string HDMV0100 AVCHD Clip Information 1212118611Snjl 1213118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1214118611Snjl# URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ 1215118611Snjl# Radiance HDR; usually has .pic or .hdr extension. 1216118611Snjl0 string #?RADIANCE\n Radiance HDR image data 1217118611Snjl#!mime image/vnd.radiance 1218118611Snjl 1219118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1220118611Snjl# URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf 1221118611Snjl# Used by the pfstools packages. The regex matches for the image size could 1222118611Snjl# probably use some work. The MIME type is made up; if there's one in 1223118611Snjl# actual common use, it should replace the one below. 1224118611Snjl0 string PFS1\x0a PFS HDR image data 1225118611Snjl#!mime image/x-pfs 1226151937Sjkim>1 regex [0-9]*\ \b, %s 1227151937Sjkim>>1 regex \ [0-9]{4} \bx%s 1228118611Snjl 1229118611Snjl# Type: Foveon X3F 1230118611Snjl# URL: http://www.photofo.com/downloads/x3f-raw-format.pdf 1231118611Snjl# From: Adam Buchbinder <adam.buchbinder@gmail.com> 1232118611Snjl# Note that the MIME type isn't defined anywhere that I can find; if 1233118611Snjl# there's a canonical type for this format, it should replace this one. 1234118611Snjl0 string FOVb Foveon X3F raw image data 1235118611Snjl!:mime image/x-x3f 1236118611Snjl>6 leshort x \b, version %d. 1237118611Snjl>4 leshort x \b%d 1238118611Snjl>28 lelong x \b, %dx 1239118611Snjl>32 lelong x \b%d 1240118611Snjl 1241118611Snjl# Paint.NET file 1242118611Snjl# From Adam Buchbinder <adam.buchbinder@gmail.com> 1243118611Snjl0 string PDN3 Paint.NET image data 1244118611Snjl!:mime image/x-paintnet 1245118611Snjl 1246118611Snjl# Not really an image. 1247118611Snjl# From: "Tano M. Fotang" <mfotang@quanteq.com> 1248118611Snjl0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR) 1249118611Snjl 1250118611Snjl# doc: http://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip 1251118611Snjl# example: http://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip 1252118611Snjl90 bequad 0x574D50484F544F00 JPEG-XR Image 1253118611Snjl>98 byte&0x08 =0x08 \b, hard tiling 1254118611Snjl>99 byte&0x80 =0x80 \b, tiling present 1255118611Snjl>99 byte&0x40 =0x40 \b, codestream present 1256118611Snjl>99 byte&0x38 x \b, spatial xform= 1257118611Snjl>99 byte&0x38 0x00 \bTL 1258118611Snjl>99 byte&0x38 0x08 \bBL 1259118611Snjl>99 byte&0x38 0x10 \bTR 1260118611Snjl>99 byte&0x38 0x18 \bBR 1261118611Snjl>99 byte&0x38 0x20 \bBT 1262118611Snjl>99 byte&0x38 0x28 \bRB 1263118611Snjl>99 byte&0x38 0x30 \bLT 1264118611Snjl>99 byte&0x38 0x38 \bLB 1265118611Snjl>100 byte&0x80 =0x80 \b, short header 1266118611Snjl>>102 beshort+1 x \b, %d 1267118611Snjl>>104 beshort+1 x \bx%d 1268118611Snjl>100 byte&0x80 =0x00 \b, long header 1269118611Snjl>>102 belong+1 x \b, %x 1270118611Snjl>>106 belong+1 x \bx%x 1271118611Snjl>101 beshort&0xf x \b, bitdepth= 1272118611Snjl>>101 beshort&0xf 0x0 \b1-WHITE=1 1273118611Snjl>>101 beshort&0xf 0x1 \b8 1274118611Snjl>>101 beshort&0xf 0x2 \b16 1275118611Snjl>>101 beshort&0xf 0x3 \b16-SIGNED 1276118611Snjl>>101 beshort&0xf 0x4 \b16-FLOAT 1277118611Snjl>>101 beshort&0xf 0x5 \b(reserved 5) 1278118611Snjl>>101 beshort&0xf 0x6 \b32-SIGNED 1279118611Snjl>>101 beshort&0xf 0x7 \b32-FLOAT 1280118611Snjl>>101 beshort&0xf 0x8 \b5 1281118611Snjl>>101 beshort&0xf 0x9 \b10 1282118611Snjl>>101 beshort&0xf 0xa \b5-6-5 1283118611Snjl>>101 beshort&0xf 0xb \b(reserved %d) 1284118611Snjl>>101 beshort&0xf 0xc \b(reserved %d) 1285>>101 beshort&0xf 0xd \b(reserved %d) 1286>>101 beshort&0xf 0xe \b(reserved %d) 1287>>101 beshort&0xf 0xf \b1-BLACK=1 1288>101 beshort&0xf0 x \b, colorfmt= 1289>>101 beshort&0xf0 0x00 \bYONLY 1290>>101 beshort&0xf0 0x10 \bYUV240 1291>>101 beshort&0xf0 0x20 \bYWV422 1292>>101 beshort&0xf0 0x30 \bYWV444 1293>>101 beshort&0xf0 0x40 \bCMYK 1294>>101 beshort&0xf0 0x50 \bCMYKDIRECT 1295>>101 beshort&0xf0 0x60 \bNCOMPONENT 1296>>101 beshort&0xf0 0x70 \bRGB 1297>>101 beshort&0xf0 0x80 \bRGBE 1298>>101 beshort&0xf0 >0x80 \b(reserved 0x%x) 1299 1300# From: Johan van der Knijff <johan.vanderknijff@kb.nl> 1301# 1302# BPG (Better Portable Graphics) format 1303# http://bellard.org/bpg/ 1304# http://fileformats.archiveteam.org/wiki/BPG 1305# 13060 string \x42\x50\x47\xFB BPG (Better Portable Graphics) 1307!:mime image/bpg 1308 1309# From: Joerg Jenderek 1310# URL: https://en.wikipedia.org/wiki/Apple_Icon_Image_format 13110 string icns Mac OS X icon 1312!:mime image/x-icns 1313!:apple ????icns 1314!:ext icns 1315>4 ubelong >0 1316# file size 1317>>4 ubelong x \b, %d bytes 1318# icon type 1319>>8 string x \b, "%4.4s" type 1320 1321# TIM images 13220 lelong 0x00000010 TIM image, 1323>4 lelong 0x8 4-Bit, 1324>4 lelong 0x9 8-Bit, 1325>4 lelong 0x2 15-Bit, 1326>4 lelong 0x3 24-Bit, 1327>4 lelong &8 1328>>(8.l+12) leshort x Pixel at (%d, 1329>>(8.l+14) leshort x \b%d) 1330>>(8.l+16) leshort x Size=%dx 1331>>(8.l+18) leshort x \b%d, 1332>>4 lelong 0x8 16 CLUT Entries at 1333>>4 lelong 0x9 256 CLUT Entries at 1334>>12 leshort x (%d, 1335>>14 leshort x \b%d) 1336>4 lelong ^8 1337>>12 leshort x Pixel at (%d, 1338>>14 leshort x \b%d) 1339>>16 leshort x Size=%dx 1340>>18 leshort x \b%d 1341 1342# MDEC streams 13430 lelong 0x80010160 MDEC video stream, 1344>16 leshort x %dx 1345>18 leshort x \b%d 1346#>8 lelong x %d frames 1347#>4 leshort x secCount=%d; 1348#>6 leshort x nSectors=%d; 1349#>12 lelong x frameSize=%d; 1350 1351# BS encoded bitstreams 13522 leshort 0x3800 BS image, 1353>6 leshort x Version %d, 1354>4 leshort x Quantization %d, 1355>0 leshort x (Decompresses to %d words) 1356 1357# Type: farbfeld image. 1358# Url: http://tools.suckless.org/farbfeld/ 1359# From: Ian D. Scott <ian@iandouglasscott.com> 1360# 13610 string farbfeld farbfeld image data, 1362>8 ubelong x %dx 1363>12 ubelong x \b%d 1364 1365# Type: Sega PVR image. 1366# From: David Korth <gerbilsoft@gerbilsoft.com> 1367# References: 1368# - http://fabiensanglard.net/Mykaruga/tools/segaPVRFormat.txt 1369# - https://github.com/yazgoo/pvrx2png 1370# - https://github.com/nickworonekin/puyotools 1371 1372# Sega PVR header. 13730 name sega-pvr-image-header 1374>0x0C leshort x %d x 1375>0x0E leshort x %d 1376# Image format. 1377>0x08 byte 0 \b, ARGB1555 1378>0x08 byte 1 \b, RGB565 1379>0x08 byte 2 \b, ARGB4444 1380>0x08 byte 3 \b, YUV442 1381>0x08 byte 4 \b, Bump 1382>0x08 byte 5 \b, 4bpp 1383>0x08 byte 6 \b, 8bpp 1384# Image data type. 1385>0x09 byte 0x01 \b, square twiddled 1386>0x09 byte 0x02 \b, square twiddled & mipmap 1387>0x09 byte 0x03 \b, VQ 1388>0x09 byte 0x04 \b, VQ & mipmap 1389>0x09 byte 0x05 \b, 8-bit CLUT twiddled 1390>0x09 byte 0x06 \b, 4-bit CLUT twiddled 1391>0x09 byte 0x07 \b, 8-bit direct twiddled 1392>0x09 byte 0x08 \b, 4-bit direct twiddled 1393>0x09 byte 0x09 \b, rectangle 1394>0x09 byte 0x0B \b, rectangular stride 1395>0x09 byte 0x0D \b, rectangular twiddled 1396>0x09 byte 0x10 \b, small VQ 1397>0x09 byte 0x11 \b, small VQ & mipmap 1398>0x09 byte 0x12 \b, square twiddled & mipmap 1399 1400# Sega PVR (Xbox) image header. 1401# Contains an embedded DirectDraw surface instead of PVR data. 14020 name sega-pvr-xbox-dds-header 1403>16 lelong x %d x 1404>12 lelong x %d, 1405>84 string x %.4s 1406 1407# Sega PVR image. 14080 string PVRT 1409>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: 1410>>0x20 use sega-pvr-xbox-dds-header 1411>0x10 belong !0x44445320 Sega PVR image: 1412>>0 use sega-pvr-image-header 1413 1414# Sega PVR image with GBIX. 14150 string GBIX 1416>0x10 string PVRT 1417>>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image: 1418>>>0x20 use sega-pvr-xbox-dds-header 1419>>0x10 belong !0x44445320 Sega PVR image: 1420>>>0x10 use sega-pvr-image-header 1421>>0x08 lelong x \b, global index = %u 1422 1423# Sega GVR header. 14240 name sega-gvr-image-header 1425>0x0C beshort x %d x 1426>0x0E beshort x %d 1427# Image data format. 1428>0x0B byte 0 \b, I4 1429>0x0B byte 1 \b, I8 1430>0x0B byte 2 \b, IA4 1431>0x0B byte 3 \b, IA8 1432>0x0B byte 4 \b, RGB565 1433>0x0B byte 5 \b, RGB5A3 1434>0x0B byte 6 \b, ARGB8888 1435>0x0B byte 8 \b, CI4 1436>0x0B byte 9 \b, CI8 1437>0x0B byte 14 \b, DXT1 1438 1439# Sega GVR image. 14400 string GVRT Sega GVR image: 1441>0x10 use sega-gvr-image-header 1442 1443# Sega GVR image with GBIX. 14440 string GBIX 1445>0x10 string GVRT Sega GVR image: 1446>>0x10 use sega-gvr-image-header 1447>>0x08 belong x \b, global index = %u 1448