images revision 267843
1226048Sobrien
268349Sobrien#------------------------------------------------------------------------------
3267843Sdelphij# $File: images,v 1.91 2014/04/30 21:41:02 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"
39267843Sdelphij0	search/1	P1		
40267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PBM image text
41267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
42267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
43267843Sdelphij!:strength + 45
44186690Sobrien!:mime	image/x-portable-bitmap
45267843Sdelphij0	search/1	P2		
46267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PGM image text
47267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
48267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
49267843Sdelphij!:strength + 45
50186690Sobrien!:mime	image/x-portable-greymap
51267843Sdelphij0	search/1	P3
52267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PPM image text
53267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
54267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
55267843Sdelphij!:strength + 45
56186690Sobrien!:mime	image/x-portable-pixmap
57267843Sdelphij0	string		P4		
58267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PBM "rawbits" image data
59267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
60267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
61267843Sdelphij!:strength + 45
62186690Sobrien!:mime	image/x-portable-bitmap
63267843Sdelphij0	string		P5		
64267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PGM "rawbits" image data
65267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
66267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
67267843Sdelphij!:strength + 45
68186690Sobrien!:mime	image/x-portable-greymap
69267843Sdelphij0	string		P6		
70267843Sdelphij>3	regex		=[0-9]{0,50}\ [0-9]{0,50}		Netpbm PPM "rawbits" image data
71267843Sdelphij>3	regex		=[0-9]{1,50}\ 		\b, size = %sx
72267843Sdelphij>>3	regex		=\ [0-9]{1,50}	\b%s
73267843Sdelphij!:strength + 45
74186690Sobrien!:mime	image/x-portable-pixmap
7569216Sobrien0	string		P7		Netpbm PAM image file
76186690Sobrien!:mime	image/x-portable-pixmap
7768349Sobrien
7869216Sobrien# From: bryanh@giraffe-data.com (Bryan Henderson)
7969216Sobrien0	string		\117\072	Solitaire Image Recorder format
8069216Sobrien>4	string		\013		MGI Type 11
8169216Sobrien>4	string		\021		MGI Type 17
8269216Sobrien0	string		.MDA		MicroDesign data
8369216Sobrien>21	byte		48		version 2
8469216Sobrien>21	byte		51		version 3
8569216Sobrien0	string		.MDP		MicroDesign page data
8669216Sobrien>21	byte		48		version 2
8769216Sobrien>21	byte		51		version 3
8869216Sobrien
8968349Sobrien# NIFF (Navy Interchange File Format, a modification of TIFF) images
90186690Sobrien# [GRR:  this *must* go before TIFF]
9168349Sobrien0	string		IIN1		NIFF image data
92186690Sobrien!:mime	image/x-niff
9368349Sobrien
94226048Sobrien# Canon RAW version 1 (CRW) files are a type of Canon Image File Format
95226048Sobrien# (CIFF) file. These are apparently all little-endian.
96226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
97226048Sobrien# URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
98226048Sobrien0	string		II\x1a\0\0\0HEAPCCDR	Canon CIFF raw image data
99226048Sobrien!:mime	image/x-canon-crw
100226048Sobrien>16	leshort		x	\b, version %d.
101226048Sobrien>14	leshort		x	\b%d
102226048Sobrien
103226048Sobrien# Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
104226048Sobrien# number. Put this above the TIFF test to make sure we detect them.
105226048Sobrien# These are apparently all little-endian.
106226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
107226048Sobrien# URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2
108226048Sobrien0	string		II\x2a\0\x10\0\0\0CR	Canon CR2 raw image data
109226048Sobrien!:mime	image/x-canon-cr2
110226048Sobrien>10	byte		x	\b, version %d.
111226048Sobrien>11	byte		x	\b%d
112226048Sobrien
11368349Sobrien# Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
11468349Sobrien# The second word of TIFF files is the TIFF version number, 42, which has
11568349Sobrien# never changed.  The TIFF specification recommends testing for it.
11668349Sobrien0	string		MM\x00\x2a	TIFF image data, big-endian
117186690Sobrien!:mime	image/tiff
11868349Sobrien0	string		II\x2a\x00	TIFF image data, little-endian
119186690Sobrien!:mime	image/tiff
12068349Sobrien
121234250Sobrien0	string		MM\x00\x2b	Big TIFF image data, big-endian
122234250Sobrien!:mime	image/tiff
123234250Sobrien0	string		II\x2b\x00	Big TIFF image data, little-endian
124234250Sobrien!:mime	image/tiff
125234250Sobrien
12668349Sobrien# PNG [Portable Network Graphics, or "PNG's Not GIF"] images
12768349Sobrien# (Greg Roelofs, newt@uchicago.edu)
12868349Sobrien# (Albert Cahalan, acahalan@cs.uml.edu)
12968349Sobrien#
13068349Sobrien# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
13168349Sobrien#
132226048Sobrien0	string		\x89PNG\x0d\x0a\x1a\x0a		PNG image data
133186690Sobrien!:mime	image/png
134267843Sdelphij>16	belong		x		\b, %d x
135267843Sdelphij>20	belong		x		%d,
136186690Sobrien>24	byte		x		%d-bit
137186690Sobrien>25	byte		0		grayscale,
138186690Sobrien>25	byte		2		\b/color RGB,
139186690Sobrien>25	byte		3		colormap,
140186690Sobrien>25	byte		4		gray+alpha,
141186690Sobrien>25	byte		6		\b/color RGBA,
142186690Sobrien#>26	byte		0		deflate/32K,
143186690Sobrien>28	byte		0		non-interlaced
144186690Sobrien>28	byte		1		interlaced
14568349Sobrien
146186690Sobrien# possible GIF replacements; none yet released!
147186690Sobrien# (Greg Roelofs, newt@uchicago.edu)
148186690Sobrien#
149186690Sobrien# GRR 950115:  this was mine ("Zip GIF"):
150186690Sobrien0	string		GIF94z		ZIF image (GIF+deflate alpha)
151186690Sobrien!:mime	image/x-unknown
152186690Sobrien#
153186690Sobrien# GRR 950115:  this is Jeremy Wohl's Free Graphics Format (better):
154186690Sobrien#					
155186690Sobrien0	string		FGF95a		FGF image (GIF+deflate beta)
156186690Sobrien!:mime	image/x-unknown
157186690Sobrien#
158186690Sobrien# GRR 950115:  this is Thomas Boutell's Portable Bitmap Format proposal
159186690Sobrien# (best; not yet implemented):
160186690Sobrien#					
161186690Sobrien0	string		PBF		PBF image (deflate compression)
162186690Sobrien!:mime	image/x-unknown
163186690Sobrien
16468349Sobrien# GIF
16568349Sobrien0	string		GIF8		GIF image data
166186690Sobrien!:mime	image/gif
167191736Sobrien!:apple	8BIMGIFf
16868349Sobrien>4	string		7a		\b, version 8%s,
16968349Sobrien>4	string		9a		\b, version 8%s,
170267843Sdelphij>6	leshort		>0		%d x
171267843Sdelphij>8	leshort		>0		%d
17268349Sobrien#>10	byte		&0x80		color mapped,
17368349Sobrien#>10	byte&0x07	=0x00		2 colors
17468349Sobrien#>10	byte&0x07	=0x01		4 colors
17568349Sobrien#>10	byte&0x07	=0x02		8 colors
17668349Sobrien#>10	byte&0x07	=0x03		16 colors
17768349Sobrien#>10	byte&0x07	=0x04		32 colors
17868349Sobrien#>10	byte&0x07	=0x05		64 colors
17968349Sobrien#>10	byte&0x07	=0x06		128 colors
18068349Sobrien#>10	byte&0x07	=0x07		256 colors
18168349Sobrien
18268349Sobrien# ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
18368349Sobrien# 1 plane, no encoding.
18468349Sobrien0	string		\361\0\100\273	CMU window manager raster image data
18568349Sobrien>4	lelong		>0		%d x
18668349Sobrien>8	lelong		>0		%d,
18768349Sobrien>12	lelong		>0		%d-bit
18868349Sobrien
18968349Sobrien# Magick Image File Format
19068349Sobrien0	string		id=ImageMagick	MIFF image data
19168349Sobrien
19268349Sobrien# Artisan
19368349Sobrien0	long		1123028772	Artisan image data
19468349Sobrien>4	long		1		\b, rectangular 24-bit
19568349Sobrien>4	long		2		\b, rectangular 8-bit with colormap
19668349Sobrien>4	long		3		\b, rectangular 32-bit (24-bit with matte)
19768349Sobrien
19868349Sobrien# FIG (Facility for Interactive Generation of figures), an object-based format
199186690Sobrien0	search/1	#FIG		FIG image text
20068349Sobrien>5	string		x		\b, version %.3s
20168349Sobrien
20268349Sobrien# PHIGS
20368349Sobrien0	string		ARF_BEGARF		PHIGS clear text archive
20468349Sobrien0	string		@(#)SunPHIGS		SunPHIGS
20568349Sobrien# version number follows, in the form m.n
20668349Sobrien>40	string		SunBin			binary
20768349Sobrien>32	string		archive			archive
20868349Sobrien
20968349Sobrien# GKS (Graphics Kernel System)
21068349Sobrien0	string		GKSM		GKS Metafile
21168349Sobrien>24	string		SunGKS		\b, SunGKS
21268349Sobrien
21368349Sobrien# CGM image files
21468349Sobrien0	string		BEGMF		clear text Computer Graphics Metafile
21568349Sobrien
21668349Sobrien# MGR bitmaps  (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
21768349Sobrien0	string	yz	MGR bitmap, modern format, 8-bit aligned
21868349Sobrien0	string	zz	MGR bitmap, old format, 1-bit deep, 16-bit aligned
21968349Sobrien0	string	xz	MGR bitmap, old format, 1-bit deep, 32-bit aligned
22068349Sobrien0	string	yx	MGR bitmap, modern format, squeezed
22168349Sobrien
22268349Sobrien# Fuzzy Bitmap (FBM) images
22368349Sobrien0	string		%bitmap\0	FBM image data
22468349Sobrien>30	long		0x31		\b, mono
22568349Sobrien>30	long		0x33		\b, color
22668349Sobrien
22768349Sobrien# facsimile data
22868349Sobrien1	string		PC\ Research,\ Inc	group 3 fax data
22968349Sobrien>29	byte		0		\b, normal resolution (204x98 DPI)
23068349Sobrien>29	byte		1		\b, fine resolution (204x196 DPI)
231110949Sobrien# From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
232110949Sobrien0	string		Sfff		structured fax file
23368349Sobrien
234267843Sdelphij# From: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
235267843Sdelphij# most files with the extension .EPA and some with .BMP
236267843Sdelphij0	string		\x11\x06	Award BIOS Logo, 136 x 84
237267843Sdelphij!:mime	image/x-award-bioslogo
238267843Sdelphij0	string		\x11\x09	Award BIOS Logo, 136 x 126
239267843Sdelphij!:mime	image/x-award-bioslogo
240267843Sdelphij#0	string		\x07\x1f	BIOS Logo corrupted?
241267843Sdelphij# http://www.blackfiveservices.co.uk/awbmtools.shtml
242267843Sdelphij# http://biosgfx.narod.ru/v3/
243267843Sdelphij# http://biosgfx.narod.ru/abr-2/
244267843Sdelphij0	string		AWBM		
245267843Sdelphij>4	leshort		<1981		Award BIOS bitmap
246267843Sdelphij!:mime	image/x-award-bmp
247267843Sdelphij# image width is a multiple of 4
248267843Sdelphij>>4	leshort&0x0003	0		
249267843Sdelphij>>>4		leshort	x		\b, %d
250267843Sdelphij>>>6		leshort	x		x %d
251267843Sdelphij>>4	leshort&0x0003	>0		\b,
252267843Sdelphij>>>4	leshort&0x0003	=1		
253267843Sdelphij>>>>4		leshort	x		%d+3
254267843Sdelphij>>>4	leshort&0x0003	=2		
255267843Sdelphij>>>>4		leshort	x		%d+2
256267843Sdelphij>>>4	leshort&0x0003	=3		
257267843Sdelphij>>>>4		leshort	x		%d+1
258267843Sdelphij>>>6		leshort	x		x %d
259267843Sdelphij# at offset 8 starts imagedata followed by "RGB " marker
260110949Sobrien
261186690Sobrien# PC bitmaps (OS/2, Windows BMP files)  (Greg Roelofs, newt@uchicago.edu)
262267843Sdelphij# http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\
263267843Sdelphij# 28bitmap_information_header.29
264186690Sobrien0	string		BM
265186690Sobrien>14	leshort		12		PC bitmap, OS/2 1.x format
266186690Sobrien!:mime	image/x-ms-bmp
26768349Sobrien>>18	leshort		x		\b, %d x
26868349Sobrien>>20	leshort		x		%d
269186690Sobrien>14	leshort		64		PC bitmap, OS/2 2.x format
270186690Sobrien!:mime	image/x-ms-bmp
27168349Sobrien>>18	leshort		x		\b, %d x
27268349Sobrien>>20	leshort		x		%d
273186690Sobrien>14	leshort		40		PC bitmap, Windows 3.x format
274186690Sobrien!:mime	image/x-ms-bmp
27568349Sobrien>>18	lelong		x		\b, %d x
27668349Sobrien>>22	lelong		x		%d x
27768349Sobrien>>28	leshort		x		%d
278267843Sdelphij>14	leshort		124		PC bitmap, Windows 98/2000 and newer format
279267843Sdelphij!:mime	image/x-ms-bmp
280267843Sdelphij>>18	lelong		x		\b, %d x
281267843Sdelphij>>22	lelong		x		%d x
282267843Sdelphij>>28	leshort		x		%d
283267843Sdelphij>14	leshort		108		PC bitmap, Windows 95/NT4 and newer format
284267843Sdelphij!:mime	image/x-ms-bmp
285267843Sdelphij>>18	lelong		x		\b, %d x
286267843Sdelphij>>22	lelong		x		%d x
287267843Sdelphij>>28	leshort		x		%d
288186690Sobrien>14	leshort		128		PC bitmap, Windows NT/2000 format
289186690Sobrien!:mime	image/x-ms-bmp
290186690Sobrien>>18	lelong		x		\b, %d x
291186690Sobrien>>22	lelong		x		%d x
292186690Sobrien>>28	leshort		x		%d
293133359Sobrien# Too simple - MPi
294133359Sobrien#0	string		IC		PC icon data
295133359Sobrien#0	string		PI		PC pointer image data
296133359Sobrien#0	string		CI		PC color icon data
297133359Sobrien#0	string		CP		PC color pointer image data
29868349Sobrien# Conflicts with other entries [BABYL]
29968349Sobrien#0	string		BA		PC bitmap array data
30068349Sobrien
30168349Sobrien# XPM icons (Greg Roelofs, newt@uchicago.edu)
302186690Sobrien0	search/1	/*\ XPM\ */	X pixmap image text
303234250Sobrien!:mime	image/x-xpmi
30468349Sobrien
30568349Sobrien# Utah Raster Toolkit RLE images (janl@ifi.uio.no)
30668349Sobrien0	leshort		0xcc52		RLE image data,
30768349Sobrien>6	leshort		x		%d x
30868349Sobrien>8	leshort		x		%d
30968349Sobrien>2	leshort		>0		\b, lower left corner: %d
31068349Sobrien>4	leshort		>0		\b, lower right corner: %d
31168349Sobrien>10	byte&0x1	=0x1		\b, clear first
31268349Sobrien>10	byte&0x2	=0x2		\b, no background
31368349Sobrien>10	byte&0x4	=0x4		\b, alpha channel
31468349Sobrien>10	byte&0x8	=0x8		\b, comment
31568349Sobrien>11	byte		>0		\b, %d color channels
31668349Sobrien>12	byte		>0		\b, %d bits per pixel
31768349Sobrien>13	byte		>0		\b, %d color map channels
31868349Sobrien
31968349Sobrien# image file format (Robert Potter, potter@cs.rochester.edu)
32068349Sobrien0	string		Imagefile\ version-	iff image data
32168349Sobrien# this adds the whole header (inc. version number), informative but longish
32268349Sobrien>10	string		>\0		%s
32368349Sobrien
32468349Sobrien# Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
32568349Sobrien0	belong		0x59a66a95	Sun raster image data
32668349Sobrien>4	belong		>0		\b, %d x
32768349Sobrien>8	belong		>0		%d,
32868349Sobrien>12	belong		>0		%d-bit,
32968349Sobrien#>16	belong		>0		%d bytes long,
33068349Sobrien>20	belong		0		old format,
33168349Sobrien#>20	belong		1		standard,
33268349Sobrien>20	belong		2		compressed,
33368349Sobrien>20	belong		3		RGB,
33468349Sobrien>20	belong		4		TIFF,
33568349Sobrien>20	belong		5		IFF,
33668349Sobrien>20	belong		0xffff		reserved for testing,
33768349Sobrien>24	belong		0		no colormap
33868349Sobrien>24	belong		1		RGB colormap
33968349Sobrien>24	belong		2		raw colormap
34068349Sobrien#>28	belong		>0		colormap is %d bytes long
34168349Sobrien
34268349Sobrien# SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
34368349Sobrien#
34468349Sobrien# See
34568349Sobrien#	http://reality.sgi.com/grafica/sgiimage.html
34668349Sobrien#
34768349Sobrien0	beshort		474		SGI image data
34868349Sobrien#>2	byte		0		\b, verbatim
34968349Sobrien>2	byte		1		\b, RLE
35068349Sobrien#>3	byte		1		\b, normal precision
35168349Sobrien>3	byte		2		\b, high precision
35268349Sobrien>4	beshort		x		\b, %d-D
35368349Sobrien>6	beshort		x		\b, %d x
35468349Sobrien>8	beshort		x		%d
35568349Sobrien>10	beshort		x		\b, %d channel
35668349Sobrien>10	beshort		!1		\bs
35768349Sobrien>80	string		>0		\b, "%s"
35868349Sobrien
35968349Sobrien0	string		IT01		FIT image data
36068349Sobrien>4	belong		x		\b, %d x
36168349Sobrien>8	belong		x		%d x
36268349Sobrien>12	belong		x		%d
36368349Sobrien#
36468349Sobrien0	string		IT02		FIT image data
36568349Sobrien>4	belong		x		\b, %d x
36668349Sobrien>8	belong		x		%d x
36768349Sobrien>12	belong		x		%d
36868349Sobrien#
36968349Sobrien2048	string		PCD_IPI		Kodak Photo CD image pack file
37084685Sobrien>0xe02	byte&0x03	0x00		, landscape mode
37184685Sobrien>0xe02	byte&0x03	0x01		, portrait mode
37284685Sobrien>0xe02	byte&0x03	0x02		, landscape mode
37384685Sobrien>0xe02	byte&0x03	0x03		, portrait mode
37468349Sobrien0	string		PCD_OPA		Kodak Photo CD overview pack file
37568349Sobrien
37668349Sobrien# FITS format.  Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
37768349Sobrien# FITS is the Flexible Image Transport System, the de facto standard for
37868349Sobrien# data and image transfer, storage, etc., for the astronomical community.
37968349Sobrien# (FITS floating point formats are big-endian.)
38068349Sobrien0	string	SIMPLE\ \ =	FITS image data
38168349Sobrien>109	string	8		\b, 8-bit, character or unsigned binary integer
38268349Sobrien>108	string	16		\b, 16-bit, two's complement binary integer
38368349Sobrien>107	string	\ 32		\b, 32-bit, two's complement binary integer
38468349Sobrien>107	string	-32		\b, 32-bit, floating point, single precision
38568349Sobrien>107	string	-64		\b, 64-bit, floating point, double precision
38668349Sobrien
38768349Sobrien# other images
38868349Sobrien0	string	This\ is\ a\ BitMap\ file	Lisp Machine bit-array-file
38968349Sobrien
39068349Sobrien# From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
39168349Sobrien# stuff.
39268349Sobrien#
39368349Sobrien0	beshort		0x1010		PEX Binary Archive
39468349Sobrien
39568349Sobrien# DICOM medical imaging data
39668349Sobrien128	string	DICM			DICOM medical imaging data
397186690Sobrien!:mime	application/dicom
39874784Sobrien
399133359Sobrien# XWD - X Window Dump file.
40074784Sobrien#   As described in /usr/X11R6/include/X11/XWDFile.h
40174784Sobrien#   used by the xwd program.
40274784Sobrien#   Bradford Castalia, idaeim, 1/01
403226048Sobrien#   updated by Adam Buchbinder, 2/09
404226048Sobrien# The following assumes version 7 of the format; the first long is the length
405226048Sobrien# of the header, which is at least 25 4-byte longs, and the one at offset 8
406226048Sobrien# is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
407226048Sobrien# which is a maximum of 32.
408226048Sobrien0	belong	>100
409226048Sobrien>8	belong	<3
410226048Sobrien>>12	belong	<33
411226048Sobrien>>>4	belong	7			XWD X Window Dump image data
412226048Sobrien!:mime	image/x-xwindowdump
413226048Sobrien>>>>100	string	>\0			\b, "%s"
414226048Sobrien>>>>16	belong	x			\b, %dx
415226048Sobrien>>>>20	belong	x			\b%dx
416226048Sobrien>>>>12	belong	x			\b%d
41774784Sobrien
41874784Sobrien# PDS - Planetary Data System
41974784Sobrien#   These files use Parameter Value Language in the header section.
42074784Sobrien#   Unfortunately, there is no certain magic, but the following
42174784Sobrien#   strings have been found to be most likely.
42274784Sobrien0	string	NJPL1I00		PDS (JPL) image data
42374784Sobrien2	string	NJPL1I			PDS (JPL) image data
42474784Sobrien0	string	CCSD3ZF			PDS (CCSD) image data
42574784Sobrien2	string	CCSD3Z			PDS (CCSD) image data
42674784Sobrien0	string	PDS_			PDS image data
42774784Sobrien0	string	LBLSIZE=		PDS (VICAR) image data
42874784Sobrien
42974784Sobrien# pM8x: ATARI STAD compressed bitmap format
43074784Sobrien#
43174784Sobrien# from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
43274784Sobrien# p M 8 5/6 xx yy zz data...
43374784Sobrien# Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
43474784Sobrien# bytes either run horizontally (pM85) or vertically (pM86). yy is the
43574784Sobrien# most frequent byte, xx and zz are runlength escape codes, where xx is
43674784Sobrien# used for runs of yy.
43774784Sobrien#
43874784Sobrien0	string	pM85		Atari ST STAD bitmap image data (hor)
43974784Sobrien>5	byte	0x00		(white background)
44074784Sobrien>5	byte	0xFF		(black background)
44174784Sobrien0	string	pM86		Atari ST STAD bitmap image data (vert)
44274784Sobrien>5	byte	0x00		(white background)
44374784Sobrien>5	byte	0xFF		(black background)
44480588Sobrien
445267843Sdelphij# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
446169962Sobrien# http://www.atarimax.com/jindroush.atari.org/afmtatr.html
447169962Sobrien0	leshort	0x0296		Atari ATR image
448169962Sobrien
44984685Sobrien# XXX:
45084685Sobrien# This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
45184685Sobrien# magic.
45280588Sobrien# SGI RICE image file <mpruett@sgi.com>
45384685Sobrien#0	beshort	0x5249		RICE image
45484685Sobrien#>2	beshort	x		v%d
45584685Sobrien#>4	beshort	x		(%d x
45684685Sobrien#>6	beshort	x		%d)
45784685Sobrien#>8	beshort	0		8 bit
45884685Sobrien#>8	beshort	1		10 bit
45984685Sobrien#>8	beshort	2		12 bit
46084685Sobrien#>8	beshort	3		13 bit
46184685Sobrien#>10	beshort	0		4:2:2
46284685Sobrien#>10	beshort	1		4:2:2:4
46384685Sobrien#>10	beshort	2		4:4:4
46484685Sobrien#>10	beshort	3		4:4:4:4
46584685Sobrien#>12	beshort	1		RGB
46684685Sobrien#>12	beshort	2		CCIR601
46784685Sobrien#>12	beshort	3		RP175
46884685Sobrien#>12	beshort	4		YUV
46984685Sobrien
470110949Sobrien# PCX image files
471110949Sobrien# From: Dan Fandrich <dan@coneharvesters.com>
472267843Sdelphij# updated by Joerg Jenderek at Feb 2013 by http://de.wikipedia.org/wiki/PCX
473267843Sdelphij# http://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt
474267843Sdelphij# GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000
475267843Sdelphij# 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
476267843Sdelphij0	ubelong&0xffF8fe00	0x0a000000	
477267843Sdelphij# for PCX bit depth > 0 
478267843Sdelphij>3	ubyte		>0	
479267843Sdelphij# test for valid versions
480267843Sdelphij>>1	ubyte		<6	
481267843Sdelphij>>>1	ubyte		!1	PCX
482267843Sdelphij!:mime	image/x-pcx
483267843Sdelphij#!:mime	image/pcx
484267843Sdelphij>>>>1	ubyte		0	ver. 2.5 image data
485267843Sdelphij>>>>1	ubyte		2	ver. 2.8 image data, with palette
486267843Sdelphij>>>>1	ubyte		3	ver. 2.8 image data, without palette
487267843Sdelphij>>>>1	ubyte		4	for Windows image data
488267843Sdelphij>>>>1	ubyte		5	ver. 3.0 image data
489267843Sdelphij>>>>4	uleshort	x	bounding box [%d,
490267843Sdelphij>>>>6	uleshort	x	%d] -
491267843Sdelphij>>>>8	uleshort	x	[%d,
492267843Sdelphij>>>>10	uleshort	x	%d],
493267843Sdelphij>>>>65	ubyte		>1	%d planes each of
494267843Sdelphij>>>>3	ubyte		x	%d-bit
495267843Sdelphij>>>>68	byte		1	colour,
496267843Sdelphij>>>>68	byte		2	grayscale,
497267843Sdelphij# this should not happen
498267843Sdelphij>>>>68	default		x	image,
499267843Sdelphij>>>>12	leshort		>0	%d x
500267843Sdelphij>>>>>14	uleshort	x	%d dpi,
501267843Sdelphij>>>>2	byte		0	uncompressed
502267843Sdelphij>>>>2	byte		1	RLE compressed
503133359Sobrien
504133359Sobrien# Adobe Photoshop
505226048Sobrien# From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
506133359Sobrien0	string		8BPS Adobe Photoshop Image
507186690Sobrien!:mime	image/vnd.adobe.photoshop
508226048Sobrien>4   beshort 2 (PSB)
509226048Sobrien>18  belong  x \b, %d x
510226048Sobrien>14  belong  x %d,
511226048Sobrien>24  beshort 0 bitmap
512226048Sobrien>24  beshort 1 grayscale
513226048Sobrien>>12 beshort 2 with alpha
514226048Sobrien>24  beshort 2 indexed
515226048Sobrien>24  beshort 3 RGB
516226048Sobrien>>12 beshort 4 \bA
517226048Sobrien>24  beshort 4 CMYK
518226048Sobrien>>12 beshort 5 \bA
519226048Sobrien>24  beshort 7 multichannel
520226048Sobrien>24  beshort 8 duotone
521226048Sobrien>24  beshort 9 lab
522226048Sobrien>12  beshort > 1
523226048Sobrien>>12  beshort x \b, %dx
524226048Sobrien>12  beshort 1 \b,
525226048Sobrien>22  beshort x %d-bit channel
526226048Sobrien>12  beshort > 1 \bs
527133359Sobrien
528133359Sobrien# XV thumbnail indicator (ThMO)
529133359Sobrien0	string		P7\ 332		XV thumbnail image data
530133359Sobrien
531133359Sobrien# NITF is defined by United States MIL-STD-2500A
532133359Sobrien0	string	NITF	National Imagery Transmission Format
533133359Sobrien>25	string	>\0	dated %.14s
534133359Sobrien
535133359Sobrien# GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
536133359Sobrien0	belong		0x00010008	GEM Image data
537133359Sobrien>12	beshort		x		%d x
538133359Sobrien>14	beshort		x		%d,
539133359Sobrien>4	beshort		x		%d planes,
540133359Sobrien>8	beshort		x		%d x
541133359Sobrien>10	beshort		x		%d pixelsize
542133359Sobrien
543133359Sobrien# GEM Metafile (Wolfram Kleff)
544133359Sobrien0	lelong		0x0018FFFF	GEM Metafile data
545133359Sobrien>4	leshort		x		version %d
546133359Sobrien
547133359Sobrien#
548133359Sobrien# SMJPEG. A custom Motion JPEG format used by Loki Entertainment
549133359Sobrien# Software Torbjorn Andersson <d91tan@Update.UU.SE>.
550133359Sobrien#
551133359Sobrien0	string	\0\nSMJPEG	SMJPEG
552133359Sobrien>8	belong	x		%d.x data
553133359Sobrien# According to the specification you could find any number of _TXT
554133359Sobrien# headers here, but I can't think of any way of handling that. None of
555133359Sobrien# the SMJPEG files I tried it on used this feature. Even if such a
556133359Sobrien# file is encountered the output should still be reasonable.
557133359Sobrien>16	string	_SND		\b,
558133359Sobrien>>24	beshort	>0		%d Hz
559133359Sobrien>>26	byte	8		8-bit
560133359Sobrien>>26	byte	16		16-bit
561133359Sobrien>>28	string	NONE		uncompressed
562133359Sobrien# >>28	string	APCM		ADPCM compressed
563133359Sobrien>>27	byte	1		mono
564133359Sobrien>>28	byte	2		stereo
565133359Sobrien# Help! Isn't there any way to avoid writing this part twice?
566133359Sobrien>>32	string	_VID		\b,
567133359Sobrien# >>>48	string	JFIF		JPEG
568133359Sobrien>>>40	belong	>0		%d frames
569133359Sobrien>>>44	beshort	>0		(%d x
570133359Sobrien>>>46	beshort	>0		%d)
571133359Sobrien>16	string	_VID		\b,
572133359Sobrien# >>32	string	JFIF		JPEG
573133359Sobrien>>24	belong	>0		%d frames
574133359Sobrien>>28	beshort	>0		(%d x
575133359Sobrien>>30	beshort	>0		%d)
576133359Sobrien
577133359Sobrien0	string	Paint\ Shop\ Pro\ Image\ File	Paint Shop Pro Image File
578133359Sobrien
579133359Sobrien# "thumbnail file" (icon)
580133359Sobrien# descended from "xv", but in use by other applications as well (Wolfram Kleff)
581133359Sobrien0       string          P7\ 332         XV "thumbnail file" (icon) data
582133359Sobrien
583133359Sobrien# taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
584133359Sobrien0       string          KiSS            KISS/GS
585133359Sobrien>4      byte            16              color
586133359Sobrien>>5     byte            x               %d bit
587133359Sobrien>>8     leshort         x               %d colors
588133359Sobrien>>10    leshort         x               %d groups
589133359Sobrien>4      byte            32              cell
590133359Sobrien>>5     byte            x               %d bit
591133359Sobrien>>8     leshort         x               %d x
592133359Sobrien>>10    leshort         x               %d
593133359Sobrien>>12    leshort         x               +%d
594133359Sobrien>>14    leshort         x               +%d
595133359Sobrien
596133359Sobrien# Webshots (www.webshots.com), by John Harrison
597133359Sobrien0       string          C\253\221g\230\0\0\0 Webshots Desktop .wbz file
598133359Sobrien
599133359Sobrien# Hercules DASD image files
600133359Sobrien# From Jan Jaeger <jj@septa.nl>
601133359Sobrien0       string  CKD_P370        Hercules CKD DASD image file
602133359Sobrien>8      long    x               \b, %d heads per cylinder
603133359Sobrien>12     long    x               \b, track size %d bytes
604133359Sobrien>16     byte    x               \b, device type 33%2.2X
605133359Sobrien
606133359Sobrien0       string  CKD_C370        Hercules compressed CKD DASD image file
607133359Sobrien>8      long    x               \b, %d heads per cylinder
608133359Sobrien>12     long    x               \b, track size %d bytes
609133359Sobrien>16     byte    x               \b, device type 33%2.2X
610133359Sobrien
611133359Sobrien0       string  CKD_S370        Hercules CKD DASD shadow file
612133359Sobrien>8      long    x               \b, %d heads per cylinder
613133359Sobrien>12     long    x               \b, track size %d bytes
614133359Sobrien>16     byte    x               \b, device type 33%2.2X
615133359Sobrien
616186690Sobrien# Squeak images and programs - etoffi@softhome.net
617186690Sobrien0	string		\146\031\0\0	Squeak image data
618186690Sobrien0	search/1	'From\040Squeak	Squeak program text
619133359Sobrien
620133359Sobrien# partimage: file(1) magic for PartImage files (experimental, incomplete)
621133359Sobrien# Author: Hans-Joachim Baader <hjb@pro-linux.de>
622133359Sobrien0		string	PaRtImAgE-VoLuMe	PartImage
623133359Sobrien>0x0020		string	0.6.1		file version %s
624267843Sdelphij>>0x0060	lelong	>-1		volume %d
625133359Sobrien#>>0x0064 8 byte identifier
626133359Sobrien#>>0x007c reserved
627133359Sobrien>>0x0200	string	>\0		type %s
628133359Sobrien>>0x1400	string	>\0		device %s,
629133359Sobrien>>0x1600	string	>\0		original filename %s,
630133359Sobrien# Some fields omitted
631133359Sobrien>>0x2744	lelong	0		not compressed
632133359Sobrien>>0x2744	lelong	1		gzip compressed
633133359Sobrien>>0x2744	lelong	2		bzip2 compressed
634133359Sobrien>>0x2744	lelong	>2		compressed with unknown algorithm
635133359Sobrien>0x0020		string	>0.6.1		file version %s
636133359Sobrien>0x0020		string	<0.6.1		file version %s
637133359Sobrien
638133359Sobrien# DCX is multi-page PCX, using a simple header of up to 1024
639133359Sobrien# offsets for the respective PCX components.
640133359Sobrien# From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
641133359Sobrien0	lelong	987654321	DCX multi-page PCX image data
642133359Sobrien
643133359Sobrien# Simon Walton <simonw@matteworld.com>
644133359Sobrien# Kodak Cineon format for scanned negatives
645133359Sobrien# http://www.kodak.com/US/en/motion/support/dlad/
646133359Sobrien0	lelong  0xd75f2a80	Cineon image data
647267843Sdelphij>200	belong  >0		\b, %d x
648267843Sdelphij>204	belong  >0		%d
649133359Sobrien
650133359Sobrien
651133359Sobrien# Bio-Rad .PIC is an image format used by microscope control systems
652133359Sobrien# and related image processing software used by biologists.
653133359Sobrien# From: Vebjorn Ljosa <vebjorn@ljosa.com>
654226048Sobrien# BOOL values are two-byte integers; use them to rule out false positives.
655226048Sobrien# http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
656226048Sobrien# Samples: http://www.loci.wisc.edu/software/sample-data
657226048Sobrien14	leshort <2
658226048Sobrien>62	leshort <2
659226048Sobrien>>54	leshort 12345		Bio-Rad .PIC Image File
660267843Sdelphij>>>0	leshort >0		%d x
661267843Sdelphij>>>2	leshort >0		%d,
662226048Sobrien>>>4	leshort =1		1 image in file
663267843Sdelphij>>>4	leshort >1		%d images in file
664133359Sobrien
665133359Sobrien# From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
666133359Sobrien# The description of *.mrw format can be found at
667133359Sobrien# http://www.dalibor.cz/minolta/raw_file_format.htm
668133359Sobrien0	string	\000MRM			Minolta Dimage camera raw image data
669133359Sobrien
670186690Sobrien# Summary: DjVu image / document
671186690Sobrien# Extension: .djvu
672186690Sobrien# Reference: http://djvu.org/docs/DjVu3Spec.djvu
673186690Sobrien# Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
674186690Sobrien# Modified by (1): Abel Cheung <abelcheung@gmail.com>
675186690Sobrien0	string	AT&TFORM
676226048Sobrien>12	string	DJVM		DjVu multiple page document
677186690Sobrien!:mime	image/vnd.djvu
678186690Sobrien>12	string	DJVU		DjVu image or single page document
679226048Sobrien!:mime	image/vnd.djvu
680186690Sobrien>12	string	DJVI		DjVu shared document
681226048Sobrien!:mime	image/vnd.djvu
682186690Sobrien>12	string	THUM		DjVu page thumbnails
683226048Sobrien!:mime	image/vnd.djvu
684133359Sobrien
685267843Sdelphij# Originally by Marc Espie
686267843Sdelphij# Modified by Robert Minsk <robertminsk at yahoo.com>
687267843Sdelphij# http://www.openexr.com/openexrfilelayout.pdf
688267843Sdelphij0	lelong		20000630	OpenEXR image data,
689267843Sdelphij!:mime image/x-exr
690267843Sdelphij>4	lelong&0x000000ff x		version %d,
691267843Sdelphij>4	lelong		^0x00000200	storage: scanline
692267843Sdelphij>4	lelong		&0x00000200	storage: tiled
693267843Sdelphij>8	search/0x1000	compression\0	\b, compression:
694267843Sdelphij>>&16	byte		0		none
695267843Sdelphij>>&16	byte		1		rle
696267843Sdelphij>>&16	byte		2		zips
697267843Sdelphij>>&16	byte		3		zip
698267843Sdelphij>>&16	byte		4		piz
699267843Sdelphij>>&16	byte		5		pxr24
700267843Sdelphij>>&16	byte		6		b44
701267843Sdelphij>>&16	byte		7		b44a
702267843Sdelphij>>&16	byte		>7		unknown
703267843Sdelphij>8	 search/0x1000	dataWindow\0	\b, dataWindow:
704267843Sdelphij>>&10	lelong		x		(%d
705267843Sdelphij>>&14	lelong		x		%d)-
706267843Sdelphij>>&18	lelong		x		\b(%d
707267843Sdelphij>>&22	lelong		x		%d)
708267843Sdelphij>8	search/0x1000	displayWindow\0	\b, displayWindow:
709267843Sdelphij>>&10	lelong		x		(%d
710267843Sdelphij>>&14	lelong		x		%d)-
711267843Sdelphij>>&18	lelong		x		\b(%d
712267843Sdelphij>>&22	lelong		x		%d)
713267843Sdelphij>8	search/0x1000	lineOrder\0	 \b, lineOrder:
714267843Sdelphij>>&14	byte		0		increasing y
715267843Sdelphij>>&14	byte		1		decreasing y
716267843Sdelphij>>&14	byte		2		random y
717267843Sdelphij>>&14	byte		>2		unknown
718133359Sobrien
719267843Sdelphij# SMPTE Digital Picture Exchange Format, SMPTE DPX
720267843Sdelphij#
721267843Sdelphij# ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
722267843Sdelphij# Moving-Picture Exchange (DPX), v1.0, 18 February 1994
723267843Sdelphij# Robert Minsk <robertminsk at yahoo.com>
724267843Sdelphij0	string		SDPX	DPX image data, big-endian,
725267843Sdelphij!:mime image/x-dpx
726267843Sdelphij>768	beshort		<4
727267843Sdelphij>>772	belong		x	%dx
728267843Sdelphij>>776	belong		x	\b%d,
729267843Sdelphij>768	beshort		>3
730267843Sdelphij>>776	belong		x	%dx
731267843Sdelphij>>772	belong		x	\b%d,
732267843Sdelphij>768	beshort		0	left to right/top to bottom
733267843Sdelphij>768	beshort		1	right to left/top to bottom
734267843Sdelphij>768	beshort		2	left to right/bottom to top
735267843Sdelphij>768	beshort		3	right to left/bottom to top
736267843Sdelphij>768	beshort		4	top to bottom/left to right
737267843Sdelphij>768	beshort		5	top to bottom/right to left
738267843Sdelphij>768	leshort		6	bottom to top/left to right
739267843Sdelphij>768	leshort		7	bottom to top/right to left
740133359Sobrien
741133359Sobrien# From: Tom Hilinski <tom.hilinski@comcast.net>
742133359Sobrien# http://www.unidata.ucar.edu/packages/netcdf/
743159764Sobrien0	string	CDF\001			NetCDF Data Format data
744159764Sobrien
745159764Sobrien#-----------------------------------------------------------------------
746159764Sobrien# Hierarchical Data Format, used to facilitate scientific data exchange
747159764Sobrien# specifications at http://hdf.ncsa.uiuc.edu/
748159764Sobrien0	belong	0x0e031301	Hierarchical Data Format (version 4) data
749186690Sobrien!:mime	application/x-hdf
750226048Sobrien0	string	\211HDF\r\n\032\n	Hierarchical Data Format (version 5) data
751186690Sobrien!:mime	application/x-hdf
752267843Sdelphij512	string	\211HDF\r\n\032\n	Hierarchical Data Format (version 5) with 512 bytes user block
753267843Sdelphij!:mime	application/x-hdf
754267843Sdelphij1024	string	\211HDF\r\n\032\n	Hierarchical Data Format (version 5) with 1k user block
755267843Sdelphij!:mime	application/x-hdf
756267843Sdelphij2048	string	\211HDF\r\n\032\n	Hierarchical Data Format (version 5) with 2k user block
757267843Sdelphij!:mime	application/x-hdf
758267843Sdelphij4096	string	\211HDF\r\n\032\n	Hierarchical Data Format (version 5) with 4k user block
759267843Sdelphij!:mime	application/x-hdf
760169942Sobrien
761267843Sdelphij
762169942Sobrien# From: Tobias Burnus <burnus@net-b.de>
763169942Sobrien# Xara (for a while: Corel Xara) is a graphic package, see
764186690Sobrien# http://www.xara.com/ for Windows and as GPL application for Linux
765169942Sobrien0	string	XARA\243\243	Xara graphics file
766186690Sobrien
767186690Sobrien# http://www.cartesianinc.com/Tech/
768186690Sobrien0	string	CPC\262		Cartesian Perceptual Compression image
769186690Sobrien!:mime	image/x-cpi
770186690Sobrien
771186690Sobrien# From Albert Cahalan <acahalan@gmail.com>
772186690Sobrien# puredigital used it for the CVS disposable camcorder
773186690Sobrien#8       lelong  4       ZBM bitmap image data
774186690Sobrien#>4      leshort x       %u x
775186690Sobrien#>6      leshort x       %u
776186690Sobrien
777186690Sobrien# From Albert Cahalan <acahalan@gmail.com>
778186690Sobrien# uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
779186690Sobrien0       string C565     OLPC firmware icon image data
780186690Sobrien>4      leshort x       %u x
781186690Sobrien>6      leshort x       %u
782186690Sobrien
783186690Sobrien# Applied Images - Image files from Cytovision
784186690Sobrien# Gustavo Junior Alves <gjalves@gjalves.com.br>
785186690Sobrien0	string	\xce\xda\xde\xfa	Cytovision Metaphases file
786186690Sobrien0	string	\xed\xad\xef\xac	Cytovision Karyotype file
787186690Sobrien0	string	\x0b\x00\x03\x00	Cytovision FISH Probe file
788186690Sobrien0	string	\xed\xfe\xda\xbe	Cytovision FLEX file
789186690Sobrien0	string	\xed\xab\xed\xfe	Cytovision FLEX file
790186690Sobrien0	string	\xad\xfd\xea\xad	Cytovision RATS file
791186690Sobrien
792186690Sobrien# Wavelet Scalar Quantization format used in gray-scale fingerprint images
793186690Sobrien# From Tano M Fotang <mfotang@quanteq.com>
794186690Sobrien0	string	\xff\xa0\xff\xa8\x00	Wavelet Scalar Quantization image data
795191736Sobrien
796267843Sdelphij# Type:		PCO B16 image files
797267843Sdelphij# URL:		http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf
798267843Sdelphij# From:		Florian Philipp <florian.philipp@binarywings.net>
799267843Sdelphij# Extension:	.b16
800267843Sdelphij# Description:	Pixel image format produced by PCO Camware, typically used
801267843Sdelphij#		together with PCO cameras.
802267843Sdelphij# Note:		Different versions exist for e.g. 8 bit and 16 bit images.
803267843Sdelphij#		Documentation is incomplete.
804267843Sdelphij0	string/b	PCO-	PCO B16 image data
805267843Sdelphij>12	lelong		x	\b, %dx
806267843Sdelphij>16	lelong		x	\b%d
807267843Sdelphij>20	lelong		0	\b, short header
808267843Sdelphij>20	lelong		-1	\b, extended header
809267843Sdelphij>>24	lelong		0	\b, grayscale
810267843Sdelphij>>>36	lelong		0	linear LUT
811267843Sdelphij>>>36	lelong		1	logarithmic LUT
812267843Sdelphij>>>28	lelong		x	[%d
813267843Sdelphij>>>32	lelong		x	\b,%d]
814267843Sdelphij>>24	lelong		1	\b, color
815267843Sdelphij>>>64	lelong		0	linear LUT
816267843Sdelphij>>>64	lelong		1	logarithmic LUT
817267843Sdelphij>>>40	lelong		x	r[%d
818267843Sdelphij>>>44	lelong		x	\b,%d]
819267843Sdelphij>>>48	lelong		x	g[%d
820267843Sdelphij>>>52	lelong		x	\b,%d]
821267843Sdelphij>>>56	lelong		x	b[%d
822267843Sdelphij>>>60	lelong		x	\b,%d]
823226048Sobrien
824267843Sdelphij# Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches
825267843Sdelphij# From: Markus Heidelberg <markus.heidelberg at web.de>
826267843Sdelphij0	string/t	[BitmapInfo2]	Polar Monitor Bitmap text
827267843Sdelphij!:mime	image/x-polar-monitor-bitmap
828267843Sdelphij
829267843Sdelphij# From: Rick Richardson <rickrich@gmail.com>
830226048Sobrien0	string	GARMIN\ BITMAP\ 01	Garmin Bitmap file
831226048Sobrien
832226048Sobrien# Type:	Ulead Photo Explorer5 (.pe5)
833226048Sobrien# URL:	http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
834226048Sobrien# From:	Simon Horman <horms@debian.org>
835226048Sobrien0	string	IIO2H			Ulead Photo Explorer5
836226048Sobrien
837226048Sobrien# Type:	X11 cursor
838226048Sobrien# URL:	http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
839226048Sobrien# From:	Mathias Brodala <info@noctus.net>
840226048Sobrien0	string	Xcur			X11 cursor
841226048Sobrien
842226048Sobrien# Type:	Olympus ORF raw images.
843226048Sobrien# URL:	http://libopenraw.freedesktop.org/wiki/Olympus_ORF
844226048Sobrien# From:	Adam Buchbinder <adam.buchbinder@gmail.com>
845226048Sobrien0	string		MMOR		Olympus ORF raw image data, big-endian
846226048Sobrien!:mime	image/x-olympus-orf
847226048Sobrien0	string		IIRO		Olympus ORF raw image data, little-endian
848226048Sobrien!:mime	image/x-olympus-orf
849226048Sobrien0	string		IIRS		Olympus ORF raw image data, little-endian
850226048Sobrien!:mime	image/x-olympus-orf
851226048Sobrien
852226048Sobrien# Type: files used in modern AVCHD camcoders to store clip information
853226048Sobrien# Extension: .cpi
854226048Sobrien# From: Alexander Danilov <alexander.a.danilov@gmail.com>
855226048Sobrien0	string	HDMV0100	AVCHD Clip Information
856226048Sobrien
857226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
858226048Sobrien# URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
859226048Sobrien# Radiance HDR; usually has .pic or .hdr extension.
860226048Sobrien0	string	#?RADIANCE\n	Radiance HDR image data
861226048Sobrien#!mime	image/vnd.radiance
862226048Sobrien
863226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
864226048Sobrien# URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
865226048Sobrien# Used by the pfstools packages. The regex matches for the image size could
866226048Sobrien# probably use some work. The MIME type is made up; if there's one in
867226048Sobrien# actual common use, it should replace the one below.
868226048Sobrien0	string	PFS1\x0a	PFS HDR image data
869226048Sobrien#!mime	image/x-pfs
870226048Sobrien>1	regex	[0-9]*\ 		\b, %s
871226048Sobrien>>1	regex	\ [0-9]{4}		\bx%s
872226048Sobrien
873226048Sobrien# Type: Foveon X3F
874226048Sobrien# URL:  http://www.photofo.com/downloads/x3f-raw-format.pdf
875226048Sobrien# From: Adam Buchbinder <adam.buchbinder@gmail.com>
876226048Sobrien# Note that the MIME type isn't defined anywhere that I can find; if
877226048Sobrien# there's a canonical type for this format, it should replace this one.
878226048Sobrien0	string	FOVb	Foveon X3F raw image data
879226048Sobrien!:mime	image/x-x3f
880226048Sobrien>6	leshort	x	\b, version %d.
881226048Sobrien>4	leshort	x	\b%d
882226048Sobrien>28	lelong	x	\b, %dx
883226048Sobrien>32	lelong	x	\b%d
884226048Sobrien
885226048Sobrien# Paint.NET file
886226048Sobrien# From Adam Buchbinder <adam.buchbinder@gmail.com>
887226048Sobrien0	string	PDN3	Paint.NET image data
888226048Sobrien!:mime	image/x-paintnet
889226048Sobrien
890226048Sobrien# Not really an image.
891226048Sobrien# From: "Tano M. Fotang" <mfotang@quanteq.com>
892226048Sobrien0	string	\x46\x4d\x52\x00	ISO/IEC 19794-2 Format Minutiae Record (FMR)
893267843Sdelphij
894267843Sdelphij# WEBP https://developers.google.com/speed/webp/docs/riff_container
895267843Sdelphij0	string	RIFF
896267843Sdelphij>8	string	WEBP	Web/P image data
897267843Sdelphij>>4	lelong	x	\b, %d bytes
898