<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: ico</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/ico.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2009-01-17T21:48:49+00:00</updated><author><name>Simon Willison</name></author><entry><title>Load Windows ICO files</title><link href="https://simonwillison.net/2009/Jan/17/ico/#atom-tag" rel="alternate"/><published>2009-01-17T21:48:49+00:00</published><updated>2009-01-17T21:48:49+00:00</updated><id>https://simonwillison.net/2009/Jan/17/ico/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.djangosnippets.org/snippets/1287/"&gt;Load Windows ICO files&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Apparently PIL has trouble with the most recent versions of the windows .ico format (Vista now embeds PNG images in them)—this clever function deals with the differences and gives back a PIL Image object.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/ico"&gt;ico&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/images"&gt;images&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pil"&gt;pil&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/png"&gt;png&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/vista"&gt;vista&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/windows"&gt;windows&lt;/a&gt;&lt;/p&gt;



</summary><category term="ico"/><category term="images"/><category term="pil"/><category term="png"/><category term="python"/><category term="vista"/><category term="windows"/></entry></feed>