Hello,<br><br>I have been using PIL to write a simple drawing program and it&#39;s been great fun. The only thing I&#39;ve really been missing from the library is a fast flood-fill routine. The included python based floodfill, while functional, is very slow (in 1.1.7), I guess due to the per-pixel access required. Since I want interactive speed, I decided to try and hack in a floodfill function in C. Instead of reinventing the wheel, I googled up a nice implementation in the &quot;graphics gems&quot; collection (<a href="http://tog.acm.org/resources/GraphicsGems/">http://tog.acm.org/resources/GraphicsGems/</a>) which needed only small modifications in order to work with the PIL code. I havent benchmarked it but it&#39;s (not surprisingly) orders of magnitudes faster than the python routine. I&#39;ve only implemented it for 8-bit palette image formats since that&#39;s what I use, but it should be easy to generalize.<br>
<br>Would it be a good idea to clean this up and submit it as a patch to PIL? The graphics gems license is very liberal and seems to me to be compatible (this is what I found on the webpage above):<br><br>---8&lt;---<br>The Graphics Gems code is copyright-protected. In other words,
you cannot claim the text of the code as your own and resell it. Using 
the code
is permitted in any program, product, or library, non-commercial or 
commercial.
Giving credit is not required, though is a nice gesture.<br>---8&lt;---<br><br>Cheers,<br>Johan<br>