Using Python to convert color formats?
<p>I'm working on a Python tool to convert image data into these color formats:</p>

<ul>
<li>RGB565</li>
<li>RGBA5551</li>
<li>RGBA4444.</li>
</ul>

<p>What's the simplest way to achieve this?</p>

<p>I've used the <a href="http://www.pythonware.com/products/pil/" rel="nofollow">Python Imaging Library (PIL)</a> frequently. So I know how to load an image and obtain each pixel value in RGBA8888 format. And I know how to write all the conversion code manually from that point.</p>

<p>Is there an easier way? Perhaps some type of 'formatter' plugin for PIL?</p>

<p>Does PIL already support some of the formats I'm targeting? I can't ever figure out which formats PIL really supports without digging though all of the source code.</p>

<p>Or is there a better library than PIL to accomplish this in Python?</p>

<p>Any tips would be appreciated. Thanks!</p>
