Thanks Jim. Comments below.<br><br>&gt; It is going to depend on (a) the format of the image file and (b) your<br>
&gt; definition of what a &quot;blank pixel&quot; is.  (Black?  White?  Something else?)<br>
<br>I&#39;m testing RGBA png(s) for blank spots. Considering that each band except the Alpha band in my image has black and white min/max values, then I&#39;m guessing that any minimum Alpha values of black (0) indicate a blank spot (this is only a guess and I&#39;m always open to better educated guesses ;-) ).<br>
<br>Here is the extrema min/max output  for each band before editing a png:<br><br>
&gt;&gt;&gt; import ImageStat<br>
&gt;&gt;&gt; stat = ImageStat.Stat(img)<br>
&gt;&gt;&gt; stat.extrema<br>
[(0, 255), (0, 255), (0, 255), (191, 255)]<br><br>After using Gimp to erase cells from the png, the extrema min/max output looks like this:<br><br>&gt;&gt;&gt; stat.extrema<br>[(0, 255), (0, 255), (0, 255), (0, 255)]<br>
<br><br>So i guess I&#39;ll test for that<br><br>
&gt; You could do a brute force check of each pixel&#39;s value, or depending on<br>
&gt; your definition, you might be able to use something like the histogram<br>
&gt; method to see if any pixels meet your criteria.<br><br><br><br><br><br><div class="gmail_quote">On Sun, Aug 14, 2011 at 4:21 PM, Jim Tittsler <span dir="ltr">&lt;<a href="mailto:jwt@onjapan.net">jwt@onjapan.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On 2011-08-08 04:09, Greg Corradini wrote:<br>
&gt; I want to use PIL to scan a newly created image for possible corrupt<br>
&gt; (blank) pixels.<br>
&gt;<br>
&gt; The PIL documentation doesn&#39;t seem to mention what value a blank pixel<br>
&gt; might have (I assume it would come back as None).  I&#39;m not sure what to<br>
&gt; test for.<br>
<br>
</div>It is going to depend on (a) the format of the image file and (b) your<br>
definition of what a &quot;blank pixel&quot; is.  (Black?  White?  Something else?)<br>
<br>
You could do a brute force check of each pixel&#39;s value, or depending on<br>
your definition, you might be able to use something like the histogram<br>
method to see if any pixels meet your criteria.<br>
<div class="im"><br>
&gt; I see the Image module has a verify function<br>
</div>&gt; &lt;<a href="http://www.pythonware.com/library/pil/handbook/image.htm" target="_blank">http://www.pythonware.com/library/pil/handbook/image.htm</a>&gt;, but I&#39;m not<br>
<div class="im">&gt; sure if that covers validating that pixels are not blank.<br>
<br>
</div>I believe it only detects if PIL will be able to load the specified<br>
image file.<br>
<font color="#888888"><br>
<br>
--<br>
Jim Tittsler     <a href="http://www.OnJapan.net/" target="_blank">http://www.OnJapan.net/</a>      GPG: 0x01159DB6<br>
Python Starship  <a href="http://Starship.Python.net/crew/jwt/" target="_blank">http://Starship.Python.net/crew/jwt/</a><br>
Mailman IRC      irc://<a href="http://irc.freenode.net/#mailman" target="_blank">irc.freenode.net/#mailman</a><br>
_______________________________________________<br>
Image-SIG maillist  -  <a href="mailto:Image-SIG@python.org">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/mailman/listinfo/image-sig</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Greg<br><br>