This file is indexed.

/usr/share/doc/python-imaging/html/image-file-formats.htm is in python-imaging-doc-html 1.1.2-1.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html><head><title>C. Image File Formats</title><link rel="stylesheet" type="text/css" href="effbot.css" /></head><body><div id="IMAGE-FILE-FORMATS-CHAPTER" class="appendix"><h1 style="appendix">C. Image File Formats</h1><p>The Python Imaging Library supports a wide variety of raster file
formats.  Nearly 30 different file formats can be identified and read
by the library.  Write support is less extensive, but most common
interchange and presentation formats are supported.</p><p>The <tt>open</tt> function identifies files from their
contents, not their names, but the <tt>save</tt> method
looks at the name to determine which format to use, unless the format
is given explicitly.</p><div class="sect1"><h2 style="sect1">Format Descriptions</h2><div id="BMP-IMAGE-FORMAT" class="sect2"><h3 style="sect2">BMP</h3><p>PIL reads and writes Windows and OS/2 BMP files containing &quot;1&quot;, &quot;L&quot;,
&quot;P&quot;, or &quot;RGB&quot; data.  16-colour images are read as &quot;P&quot;
images. Run-length encoding is not supported.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>compression</tt>.  Set to &quot;bmp_rle&quot; if the file is
run-length encoded.</p></div><div id="CUR-IMAGE-FORMAT" class="sect2"><h3 style="sect2">CUR (read only)</h3><p>CUR is used to store cursors on Windows.  The CUR decoder reads the
largest available cursor.  Animated cursors are not supported.</p></div><div id="DCX-IMAGE-FORMAT" class="sect2"><h3 style="sect2">DCX (read only)</h3><p>DCX is a container file format for PCX files, defined by Intel.  The
DCX format is commonly used in fax applications.  The DCX decoder
files containing &quot;1&quot;, &quot;L&quot;, &quot;P&quot;, or &quot;RGB&quot; data. Only the first image is
read.</p></div><div id="EPS-IMAGE-FORMAT" class="sect2"><h3 style="sect2">EPS (write-only)</h3><p>The library identifies EPS files containing image data.  It can also
write EPS images.</p></div><div id="FLI-IMAGE-FORMAT" class="sect2"><h3 style="sect2">FLI, FLC (read only)</h3><p>The library reads Autodesk FLI and FLC animations.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>duration</tt>. The delay (in milliseconds) between
each frame.</p></div><div id="FPX-IMAGE-FORMAT" class="sect2"><h3 style="sect2">FPX (read only)</h3><p>The library reads Kodak <i>FlashPix</i> files.  In the
current version, only the highest resolution image is read from the
file, and the viewing transform is not taken into account.</p><p><i>Note: To enable full FlashPix support, you need to build and
install the IJG JPEG library before building the Python Imaging
Library. See the distribution README for details.</i></p></div><div id="GBR-IMAGE-FORMAT" class="sect2"><h3 style="sect2">GBR (read only)</h3><p>The GBR decoder reads GIMP brush files.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>description</tt>. The brush name.</p></div><div id="GD-IMAGE-FORMAT" class="sect2"><h3 style="sect2">GD (read only)</h3><p>The library reads GD uncompressed files.  Note that this file format
cannot be automatically identified, so you must use the
<tt>open</tt> function in the
<tt>GdImageFile</tt> module to read such a file.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>transparency</tt>.  Transparency colour index. This key
is omitted if the image is not transparent.</p></div><div id="GIF-IMAGE-FORMAT" class="sect2"><h3 style="sect2">GIF</h3><p>The library reads GIF87a and GIF89a versions of the GIF file
format. The library writes run-length encoded GIF87a files.  Note that
GIF files are always read as palette mode (&quot;P&quot;) images.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>version</tt>. Version (either &quot;GIF87a&quot; or &quot;GIF89a&quot;).</p><p><tt>transparency</tt>.  Transparency colour index.  This key
is omitted if the image is not transparent.</p></div><div id="ICO-IMAGE-FORMAT" class="sect2"><h3 style="sect2">ICO (read only)</h3><p>ICO is used to store icons on Windows.  The largest available icon is
read.</p></div><div id="IM-IMAGE-FORMAT" class="sect2"><h3 style="sect2">IM</h3><p>IM is a format used by LabEye and other applications based on the
IFUNC image processing library.  The library reads and writes most
uncompressed interchange versions of this format.</p><p>IM is the only format that can store <i>all</i> internal
PIL formats.</p></div><div id="IMT-IMAGE-FORMAT" class="sect2"><h3 style="sect2">IMT (read only)</h3><p>The library reads Image Tools images containing &quot;L&quot; data.</p></div><div id="JPEG-IMAGE-FORMAT" class="sect2"><h3 style="sect2">JPEG</h3><p>The library reads JPEG, JFIF, and Adobe JPEG files containing &quot;L&quot;,
&quot;RGB&quot;, or &quot;CMYK&quot; data. It writes standard and progressive JFIF files.</p><p>Using the <tt>draft</tt> method, you can speed things up
by converting &quot;RGB&quot; images to &quot;L&quot;, and resize images to 1/2, 1/4 or
1/8 of their original size while loading them.  The draft method also
configures the JPEG decoder to trade some quality for speed.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>jfif</tt>. JFIF application marker found. If the file is
not a JFIF file, this key is not present.</p><p><tt>adobe</tt>. Adobe application marker found. If the file
is not an Adobe JPEG file, this key is not present.</p><p><tt>progression</tt>. Indicates that this is a progressive
JPEG file.</p><p>The <tt>save</tt> method supports the following options:</p><p><tt>quality</tt>. Specify the image quality, on a scale from
1 (worst) to 100 (best). The default is 75.</p><p><tt>optimize</tt>. If present, indicates that the encoder
should make an extra pass over the image in order to select optimal
encoder settings.</p><p><tt>progression</tt>. If present, indicates that this image
should be stored as a progressive JPEG file.</p><p><i>Note: To enable JPEG support, you need to build and install
the IJG JPEG library before building the Python Imaging Library. See
the distribution README for details.</i></p></div><div id="MIC-IMAGE-FORMAT" class="sect2"><h3 style="sect2">MIC (read only)</h3><p>The library identifies and reads Microsoft Image Composer (MIC)
files. When opened, the first sprite in the file is loaded.  You can
use <tt>seek</tt> and <tt>tell</tt> to read
other sprites from the file.</p></div><div id="MCIDAS-IMAGE-FORMAT" class="sect2"><h3 style="sect2">MCIDAS (read only)</h3><p>The library identifies and reads 8-bit McIdas area files.</p></div><div id="MPEG-IMAGE-FORMAT" class="sect2"><h3 style="sect2">MPEG (identify only)</h3><p>The library identifies MPEG files.</p></div><div id="MSP-IMAGE-FORMAT" class="sect2"><h3 style="sect2">MSP</h3><p>The library identifies and reads MSP files from Windows 1 and 2.  The
library writes uncompressed (Windows 1) versions of this format.</p></div><div id="PCD-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PCD (read only)</h3><p>The library reads PhotoCD files containing &quot;RGB&quot; data.  By default,
the 768x512 resolution is read.  You can use the
<tt>draft</tt> method to read the lower resolution
versions instead, thus effectively resizing the image to 384x256 or
192x128. Higher resolutions cannot be read by the Python Imaging
Library.</p></div><div id="PCX-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PCX</h3><p>The library reads and writes PCX files containing &quot;1&quot;, &quot;L&quot;, &quot;P&quot;, or
&quot;RGB&quot; data.</p></div><div id="PDF-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PDF (write only)</h3><p>The library can write PDF (Acrobat) images.  Such images are written
as binary PDF 1.1 files, using either JPEG or HEX encoding depending
on the image mode (and whether JPEG support is available or not).</p></div><div id="PNG-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PNG</h3><p>The library identifies, reads, and writes PNG files containing &quot;1&quot;,
&quot;L&quot;, &quot;P&quot;, &quot;RGB&quot;, or &quot;RGBA&quot; data.  Interlaced files are currently not
supported.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>gamma</tt>. Gamma, given as a floating point number.</p><p><tt>transparency</tt>. Transparency colour index. This key
is omitted if the image is not a transparent palette image.</p><p>The <tt>save</tt> method supports the following options:</p><p><tt>optimize</tt>.  If present, instructs the PNG writer to
make the output file as small as possible. This includes extra
processing in order to find optimal encoder settings.</p><p><i>Note: To enable PNG support, you need to build and install
the ZLIB compression library before building the Python Imaging
Library. See the distribution README for details.</i></p></div><div id="PPM-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PPM</h3><p>The library reads and writes PBM, PGM and PPM files containing &quot;1&quot;,
&quot;L&quot; or &quot;RGB&quot; data.</p></div><div id="PSD-IMAGE-FORMAT" class="sect2"><h3 style="sect2">PSD (read only)</h3><p>The library identifies and reads PSD files written by Adobe Photoshop
2.5 and 3.0.</p></div><div id="SGI-IMAGE-FORMAT" class="sect2"><h3 style="sect2">SGI (read only)</h3><p>The library reads uncompressed &quot;L&quot; and &quot;RGB&quot; files. This driver is
highly experimental.</p></div><div id="SUN-IMAGE-FORMAT" class="sect2"><h3 style="sect2">SUN (read only)</h3><p>The library reads uncompressed &quot;1&quot;, &quot;P&quot;, &quot;L&quot; and &quot;RGB&quot; files.</p></div><div id="TGA-IMAGE-FORMAT" class="sect2"><h3 style="sect2">TGA (read only)</h3><p>The library reads 24- and 32-bit uncompressed and run-length encoded
TGA files.</p></div><div id="TIFF-IMAGE-FORMAT" class="sect2"><h3 style="sect2">TIFF</h3><p>The library reads and writes TIFF files containing &quot;1&quot;, &quot;L&quot;, &quot;RGB&quot;, or
&quot;CMYK&quot; data.  It reads both striped and tiled images, pixel and plane
interleaved multi-band images, and either uncompressed, or Packbits,
LZW, or JPEG compressed images.  The current version always writes
uncompressed TIFF files.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>compression</tt>. Compression mode.</p><p>In addition, the <tt>tag</tt> attribute contains a
dictionary of decoded TIFF fields.  Values are stored as either
strings or tuples.  Note that only short, long and ASCII tags are
correctly unpacked by this release.</p></div><div id="XBM-IMAGE-FORMAT" class="sect2"><h3 style="sect2">XBM</h3><p>The library reads and writes X bitmap files (mode &quot;1&quot;).</p></div><div id="XPM-IMAGE-FORMAT" class="sect2"><h3 style="sect2">XPM (read only)</h3><p>The library reads X pixmap files (mode &quot;P&quot;) with 256 colours or less.</p><p>The <tt>open</tt> method sets the following
<tt>info</tt> properties:</p><p><tt>transparency</tt>. Transparency colour index. This key
is omitted if the image is not transparent.</p></div><div class="sect2"><h3 style="sect2">File Extensions</h3><p>The Python Imaging Library associates file name extensions to each
file format.  The <tt>open</tt> function identifies files
from their contents, not their names, but the
<tt>save</tt> method looks at the name to determine which
format to use, unless the format is given explicitly.</p><p><tt>BMP</tt>. &quot;.bmp&quot;, &quot;.dib&quot;</p><p><tt>CUR</tt>. &quot;.cur&quot;</p><p><tt>DCX</tt>. &quot;.dcx&quot;</p><p><tt>EPS</tt>. &quot;.eps&quot;, &quot;.ps&quot;</p><p><tt>FLI</tt>. &quot;.fli&quot;, &quot;.flc&quot;</p><p><tt>FPX</tt>. &quot;.fpx&quot;</p><p><tt>GBR</tt>. &quot;.gbr&quot;</p><p><tt>GD</tt>. &quot;.gd&quot;</p><p><tt>GIF</tt>. &quot;.gif&quot;</p><p><tt>ICO</tt>. &quot;.ico&quot;</p><p><tt>IM</tt>. &quot;.im&quot;</p><p><tt>JPEG</tt>. &quot;.jpg&quot;, &quot;.jpe&quot;, &quot;.jpeg&quot;</p><p><tt>MIC</tt>. &quot;.mic&quot;</p><p><tt>MSP</tt>. &quot;.msp&quot;</p><p><tt>PCD</tt>. &quot;.pcd&quot;</p><p><tt>PCX</tt>. &quot;.pcx&quot;</p><p><tt>PDF</tt>. &quot;.pdf&quot;</p><p><tt>PNG</tt>. &quot;.png&quot;</p><p><tt>PPM</tt>. &quot;.pbm&quot;, &quot;.pgm&quot;, &quot;.ppm&quot;</p><p><tt>PSD</tt>. &quot;.psd&quot;</p><p><tt>SGI</tt>. &quot;.bw&quot;, &quot;.rgb&quot;, &quot;.cmyk&quot;</p><p><tt>SUN</tt>. &quot;.ras&quot;</p><p><tt>TGA</tt>. &quot;.tga&quot;</p><p><tt>TIFF</tt>. &quot;.tif&quot;, &quot;.tiff&quot;</p><p><tt>XBM</tt>. &quot;.xbm&quot;</p><p><tt>XPM</tt>. &quot;.xpm&quot;</p><p>Keep in mind that not all of these formats can actually be saved by
the library.</p></div></div></div></body></html>