Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > b17ed897c34853a0a39ef25ab5d3af32 > files > 108

python3-pillow-doc-2.6.2-2.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Writing your own file decoder &mdash; Pillow v2.6.2 (PIL fork)</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.6.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="top" title="Pillow v2.6.2 (PIL fork)" href="../index.html" />
    <link rel="up" title="Appendices" href="appendices.html" />
    <link rel="next" title="Original PIL README" href="../original-readme.html" />
    <link rel="prev" title="Image file formats" href="image-file-formats.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../original-readme.html" title="Original PIL README"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="image-file-formats.html" title="Image file formats"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Home</a> &raquo;</li>
          <li><a href="appendices.html" accesskey="U">Appendices</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="writing-your-own-file-decoder">
<h1>Writing your own file decoder<a class="headerlink" href="#writing-your-own-file-decoder" title="Permalink to this headline">¶</a></h1>
<p>The Python Imaging Library uses a plug-in model which allows you to
add your own decoders to the library, without any changes to the
library itself. Such plug-ins usually have names like
<tt class="file docutils literal"><span class="pre">XxxImagePlugin.py</span></tt>, where <tt class="docutils literal"><span class="pre">Xxx</span></tt> is a unique format name
(usually an abbreviation).</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Pillow &gt;= 2.1.0 no longer automatically imports any file in the Python path with a name ending in <tt class="file docutils literal"><span class="pre">ImagePlugin.py</span></tt>.  You will need to import your decoder manually.</p>
</div>
<p>A decoder plug-in should contain a decoder class, based on the
<tt class="xref py py-class docutils literal"><span class="pre">PIL.ImageFile.ImageFile</span></tt> base class. This class should provide an
<tt class="xref py py-meth docutils literal"><span class="pre">_open()</span></tt> method, which reads the file header and sets up at least the
<tt class="xref py py-attr docutils literal"><span class="pre">mode</span></tt> and <tt class="xref py py-attr docutils literal"><span class="pre">size</span></tt>
attributes. To be able to load the file, the method must also create a list of
<tt class="xref py py-attr docutils literal"><span class="pre">tile</span></tt> descriptors. The class must be explicitly registered, via a
call to the <a class="reference internal" href="../reference/Image.html#module-PIL.Image" title="PIL.Image"><tt class="xref py py-mod docutils literal"><span class="pre">Image</span></tt></a> module.</p>
<p>For performance reasons, it is important that the <tt class="xref py py-meth docutils literal"><span class="pre">_open()</span></tt> method
quickly rejects files that do not have the appropriate contents.</p>
<div class="section" id="example">
<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
<p>The following plug-in supports a simple format, which has a 128-byte header
consisting of the words “SPAM” followed by the width, height, and pixel size in
bits. The header fields are separated by spaces. The image data follows
directly after the header, and can be either bi-level, greyscale, or 24-bit
true color.</p>
<p><strong>SpamImagePlugin.py</strong>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span><span class="p">,</span> <span class="n">ImageFile</span>
<span class="kn">import</span> <span class="nn">string</span>

<span class="k">class</span> <span class="nc">SpamImageFile</span><span class="p">(</span><span class="n">ImageFile</span><span class="o">.</span><span class="n">ImageFile</span><span class="p">):</span>

    <span class="n">format</span> <span class="o">=</span> <span class="s">&quot;SPAM&quot;</span>
    <span class="n">format_description</span> <span class="o">=</span> <span class="s">&quot;Spam raster image&quot;</span>

    <span class="k">def</span> <span class="nf">_open</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>

        <span class="c"># check header</span>
        <span class="n">header</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fp</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="mi">128</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">header</span><span class="p">[:</span><span class="mi">4</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&quot;SPAM&quot;</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">SyntaxError</span><span class="p">,</span> <span class="s">&quot;not a SPAM file&quot;</span>

        <span class="n">header</span> <span class="o">=</span> <span class="n">string</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">header</span><span class="p">)</span>

        <span class="c"># size in pixels (width, height)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">header</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="nb">int</span><span class="p">(</span><span class="n">header</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>

        <span class="c"># mode setting</span>
        <span class="n">bits</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">header</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
        <span class="k">if</span> <span class="n">bits</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&quot;1&quot;</span>
        <span class="k">elif</span> <span class="n">bits</span> <span class="o">==</span> <span class="mi">8</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&quot;L&quot;</span>
        <span class="k">elif</span> <span class="n">bits</span> <span class="o">==</span> <span class="mi">24</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&quot;RGB&quot;</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">SyntaxError</span><span class="p">,</span> <span class="s">&quot;unknown number of bits&quot;</span>

        <span class="c"># data descriptor</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tile</span> <span class="o">=</span> <span class="p">[</span>
            <span class="p">(</span><span class="s">&quot;raw&quot;</span><span class="p">,</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">,</span> <span class="mi">128</span><span class="p">,</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mode</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
        <span class="p">]</span>

<span class="n">Image</span><span class="o">.</span><span class="n">register_open</span><span class="p">(</span><span class="s">&quot;SPAM&quot;</span><span class="p">,</span> <span class="n">SpamImageFile</span><span class="p">)</span>

<span class="n">Image</span><span class="o">.</span><span class="n">register_extension</span><span class="p">(</span><span class="s">&quot;SPAM&quot;</span><span class="p">,</span> <span class="s">&quot;.spam&quot;</span><span class="p">)</span>
<span class="n">Image</span><span class="o">.</span><span class="n">register_extension</span><span class="p">(</span><span class="s">&quot;SPAM&quot;</span><span class="p">,</span> <span class="s">&quot;.spa&quot;</span><span class="p">)</span> <span class="c"># dos version</span>
</pre></div>
</div>
<p>The format handler must always set the <tt class="xref py py-attr docutils literal"><span class="pre">size</span></tt> and
<tt class="xref py py-attr docutils literal"><span class="pre">mode</span></tt> attributes. If these are not set, the file
cannot be opened. To simplify the decoder, the calling code considers
exceptions like <tt class="xref py py-exc docutils literal"><span class="pre">SyntaxError</span></tt>, <tt class="xref py py-exc docutils literal"><span class="pre">KeyError</span></tt>, and
<tt class="xref py py-exc docutils literal"><span class="pre">IndexError</span></tt>, as a failure to identify the file.</p>
<p>Note that the decoder must be explicitly registered using
<tt class="xref py py-func docutils literal"><span class="pre">PIL.Image.register_open()</span></tt>. Although not required, it is also a good
idea to register any extensions used by this format.</p>
</div>
<div class="section" id="the-tile-attribute">
<h2>The <tt class="xref py py-attr docutils literal"><span class="pre">tile</span></tt> attribute<a class="headerlink" href="#the-tile-attribute" title="Permalink to this headline">¶</a></h2>
<p>To be able to read the file as well as just identifying it, the <tt class="xref py py-attr docutils literal"><span class="pre">tile</span></tt>
attribute must also be set. This attribute consists of a list of tile
descriptors, where each descriptor specifies how data should be loaded to a
given region in the image. In most cases, only a single descriptor is used,
covering the full image.</p>
<p>The tile descriptor is a 4-tuple with the following contents:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="n">decoder</span><span class="p">,</span> <span class="n">region</span><span class="p">,</span> <span class="n">offset</span><span class="p">,</span> <span class="n">parameters</span><span class="p">)</span>
</pre></div>
</div>
<p>The fields are used as follows:</p>
<dl class="docutils">
<dt><strong>decoder</strong></dt>
<dd>Specifies which decoder to use. The <tt class="docutils literal"><span class="pre">raw</span></tt> decoder used here supports
uncompressed data, in a variety of pixel formats. For more information on
this decoder, see the description below.</dd>
<dt><strong>region</strong></dt>
<dd>A 4-tuple specifying where to store data in the image.</dd>
<dt><strong>offset</strong></dt>
<dd>Byte offset from the beginning of the file to image data.</dd>
<dt><strong>parameters</strong></dt>
<dd>Parameters to the decoder. The contents of this field depends on the
decoder specified by the first field in the tile descriptor tuple. If the
decoder doesn’t need any parameters, use None for this field.</dd>
</dl>
<p>Note that the <tt class="xref py py-attr docutils literal"><span class="pre">tile</span></tt> attribute contains a list of tile descriptors,
not just a single descriptor.</p>
<p>The <tt class="docutils literal"><span class="pre">raw</span></tt> decoder</p>
<p>The <tt class="docutils literal"><span class="pre">raw</span></tt> decoder is used to read uncompressed data from an image file. It
can be used with most uncompressed file formats, such as PPM, BMP, uncompressed
TIFF, and many others. To use the raw decoder with the
<tt class="xref py py-func docutils literal"><span class="pre">PIL.Image.fromstring()</span></tt> function, use the following syntax:</p>
<div class="highlight-python"><div class="highlight"><pre>image = Image.fromstring(
    mode, size, data, &quot;raw&quot;,
    raw mode, stride, orientation
    )
</pre></div>
</div>
<p>When used in a tile descriptor, the parameter field should look like:</p>
<div class="highlight-python"><div class="highlight"><pre>(raw mode, stride, orientation)
</pre></div>
</div>
<p>The fields are used as follows:</p>
<dl class="docutils">
<dt><strong>raw mode</strong></dt>
<dd>The pixel layout used in the file, and is used to properly convert data to
PIL’s internal layout. For a summary of the available formats, see the
table below.</dd>
<dt><strong>stride</strong></dt>
<dd>The distance in bytes between two consecutive lines in the image. If 0, the
image is assumed to be packed (no padding between lines). If omitted, the
stride defaults to 0.</dd>
</dl>
<p><strong>orientation</strong></p>
<blockquote>
<div>Whether the first line in the image is the top line on the screen (1), or
the bottom line (-1). If omitted, the orientation defaults to 1.</div></blockquote>
<p>The <strong>raw mode</strong> field is used to determine how the data should be unpacked to
match PIL’s internal pixel layout. PIL supports a large set of raw modes; for a
complete list, see the table in the <tt class="xref py py-mod docutils literal"><span class="pre">Unpack.c</span></tt> module. The following
table describes some commonly used <strong>raw modes</strong>:</p>
<table border="1" class="docutils">
<colgroup>
<col width="14%" />
<col width="86%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">mode</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">1</span></tt></td>
<td>1-bit bilevel, stored with the leftmost pixel in the most
significant bit. 0 means black, 1 means white.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">1;I</span></tt></td>
<td>1-bit inverted bilevel, stored with the leftmost pixel in the
most significant bit. 0 means white, 1 means black.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">1;R</span></tt></td>
<td>1-bit reversed bilevel, stored with the leftmost pixel in the
least significant bit. 0 means black, 1 means white.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">L</span></tt></td>
<td>8-bit greyscale. 0 means black, 255 means white.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">L;I</span></tt></td>
<td>8-bit inverted greyscale. 0 means white, 255 means black.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">P</span></tt></td>
<td>8-bit palette-mapped image.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">RGB</span></tt></td>
<td>24-bit true colour, stored as (red, green, blue).</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">BGR</span></tt></td>
<td>24-bit true colour, stored as (blue, green, red).</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">RGBX</span></tt></td>
<td>24-bit true colour, stored as (blue, green, red, pad).</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">RGB;L</span></tt></td>
<td>24-bit true colour, line interleaved (first all red pixels, the
all green pixels, finally all blue pixels).</td>
</tr>
</tbody>
</table>
<p>Note that for the most common cases, the raw mode is simply the same as the mode.</p>
<p>The Python Imaging Library supports many other decoders, including JPEG, PNG,
and PackBits. For details, see the <tt class="file docutils literal"><span class="pre">decode.c</span></tt> source file, and the
standard plug-in implementations provided with the library.</p>
</div>
<div class="section" id="decoding-floating-point-data">
<h2>Decoding floating point data<a class="headerlink" href="#decoding-floating-point-data" title="Permalink to this headline">¶</a></h2>
<p>PIL provides some special mechanisms to allow you to load a wide variety of
formats into a mode <tt class="docutils literal"><span class="pre">F</span></tt> (floating point) image memory.</p>
<p>You can use the <tt class="docutils literal"><span class="pre">raw</span></tt> decoder to read images where data is packed in any
standard machine data type, using one of the following raw modes:</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">mode</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F</span></tt></td>
<td>32-bit native floating point.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;8</span></tt></td>
<td>8-bit unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;8S</span></tt></td>
<td>8-bit signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;16</span></tt></td>
<td>16-bit little endian unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;16S</span></tt></td>
<td>16-bit little endian signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;16B</span></tt></td>
<td>16-bit big endian unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;16BS</span></tt></td>
<td>16-bit big endian signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;16N</span></tt></td>
<td>16-bit native unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;16NS</span></tt></td>
<td>16-bit native signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;32</span></tt></td>
<td>32-bit little endian unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;32S</span></tt></td>
<td>32-bit little endian signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;32B</span></tt></td>
<td>32-bit big endian unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;32BS</span></tt></td>
<td>32-bit big endian signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;32N</span></tt></td>
<td>32-bit native unsigned integer.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;32NS</span></tt></td>
<td>32-bit native signed integer.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;32F</span></tt></td>
<td>32-bit little endian floating point.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;32BF</span></tt></td>
<td>32-bit big endian floating point.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;32NF</span></tt></td>
<td>32-bit native floating point.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;64F</span></tt></td>
<td>64-bit little endian floating point.</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">F;64BF</span></tt></td>
<td>64-bit big endian floating point.</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">F;64NF</span></tt></td>
<td>64-bit native floating point.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="the-bit-decoder">
<h2>The bit decoder<a class="headerlink" href="#the-bit-decoder" title="Permalink to this headline">¶</a></h2>
<p>If the raw decoder cannot handle your format, PIL also provides a special “bit”
decoder that can be used to read various packed formats into a floating point
image memory.</p>
<p>To use the bit decoder with the fromstring function, use the following syntax:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">image</span> <span class="o">=</span> <span class="n">fromstring</span><span class="p">(</span>
    <span class="n">mode</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="s">&quot;bit&quot;</span><span class="p">,</span>
    <span class="n">bits</span><span class="p">,</span> <span class="n">pad</span><span class="p">,</span> <span class="n">fill</span><span class="p">,</span> <span class="n">sign</span><span class="p">,</span> <span class="n">orientation</span>
    <span class="p">)</span>
</pre></div>
</div>
<p>When used in a tile descriptor, the parameter field should look like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">(</span><span class="n">bits</span><span class="p">,</span> <span class="n">pad</span><span class="p">,</span> <span class="n">fill</span><span class="p">,</span> <span class="n">sign</span><span class="p">,</span> <span class="n">orientation</span><span class="p">)</span>
</pre></div>
</div>
<p>The fields are used as follows:</p>
<dl class="docutils">
<dt><strong>bits</strong></dt>
<dd>Number of bits per pixel (2-32). No default.</dd>
<dt><strong>pad</strong></dt>
<dd>Padding between lines, in bits. This is either 0 if there is no padding, or
8 if lines are padded to full bytes. If omitted, the pad value defaults to
8.</dd>
<dt><strong>fill</strong></dt>
<dd>Controls how data are added to, and stored from, the decoder bit buffer.</dd>
<dt><strong>fill=0</strong></dt>
<dd>Add bytes to the LSB end of the decoder buffer; store pixels from the MSB
end.</dd>
<dt><strong>fill=1</strong></dt>
<dd>Add bytes to the MSB end of the decoder buffer; store pixels from the MSB
end.</dd>
<dt><strong>fill=2</strong></dt>
<dd>Add bytes to the LSB end of the decoder buffer; store pixels from the LSB
end.</dd>
<dt><strong>fill=3</strong></dt>
<dd><p class="first">Add bytes to the MSB end of the decoder buffer; store pixels from the LSB
end.</p>
<p class="last">If omitted, the fill order defaults to 0.</p>
</dd>
<dt><strong>sign</strong></dt>
<dd>If non-zero, bit fields are sign extended. If zero or omitted, bit fields
are unsigned.</dd>
<dt><strong>orientation</strong></dt>
<dd>Whether the first line in the image is the top line on the screen (1), or
the bottom line (-1). If omitted, the orientation defaults to 1.</dd>
</dl>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Writing your own file decoder</a><ul>
<li><a class="reference internal" href="#example">Example</a></li>
<li><a class="reference internal" href="#the-tile-attribute">The <tt class="docutils literal"><span class="pre">tile</span></tt> attribute</a></li>
<li><a class="reference internal" href="#decoding-floating-point-data">Decoding floating point data</a></li>
<li><a class="reference internal" href="#the-bit-decoder">The bit decoder</a></li>
</ul>
</li>
</ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/handbook/writing-your-own-file-decoder.txt"
           rel="nofollow">Show Source</a></li>
  </ul><h3>Need help?</h3>
<p>
    You can get help via IRC at <a href="irc://irc.freenode.net#pil">irc://irc.freenode.net#pil</a> or Stack Overflow <a href="http://stackoverflow.com/questions/tagged/pillow">here</a> and <a href="http://stackoverflow.com/questions/tagged/pil">here</a>. Please <a href="https://github.com/python-pillow/Pillow/issues/new">report issues on GitHub</a>.
</p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../original-readme.html" title="Original PIL README"
             >next</a> |</li>
        <li class="right" >
          <a href="image-file-formats.html" title="Image file formats"
             >previous</a> |</li>
        <li><a href="../index.html">Home</a> &raquo;</li>
          <li><a href="appendices.html" >Appendices</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 1997-2011 by Secret Labs AB, 1995-2011 by Fredrik Lundh, 2010-2013 Alex Clark.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>