Yes, I understand what a loop is, and there was a loop but I didn't write that code into my email because I didn't need commenting on it. <br>Here is the code so its clear incase you really care =P<br><br>from PIL import Image
<br>from PIL import ImageGrab<br>import time<br><br>capturedFrames = 100<br>count = 0<br><br>print &quot;\nInitializing Engine...&quot;<br>newView = ImageGrab.grab()<br>print &quot;Engine Initilized Successfully!&quot;<br>
<br>raw_input(&quot;Press any key to begin...&quot;)<br><br>print &quot;\nInitializing capture cycle...&quot;<br><br>startClock = time.clock()<br><br>for i in range(capturedFrames): # Here is the loop I was timing that I commented is extremely slow using the method you suggested. It does work however. 
<br>&nbsp;&nbsp;&nbsp; oldView = newView<br>&nbsp;&nbsp;&nbsp; newView = ImageGrab.grab()<br>&nbsp;&nbsp;&nbsp; if oldView.tostring() != newView.tostring():<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count = count + 1<br><br><br>endClock = time.clock()<br>totalTime = endClock - startClock<br>calculatedFPS = capturedFrames / totalTime
<br><br>horRes = str(newView.getbbox()[2])<br>verRes = str(newView.getbbox()[3])<br><br>print &quot;Frame Resolution&nbsp;&nbsp;&nbsp;&nbsp; : %sx%s&quot; % (horRes.rjust(4), verRes.rjust(4))<br>print &quot;Frames Captured&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : %s&quot; % str(capturedFrames).rjust(9)
<br>print &quot;Capture Time (sec)&nbsp;&nbsp; : %s&quot; % str(totalTime)[:4].rjust(9)<br>print &quot;Calculated FPS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : %s&quot; % str(calculatedFPS)[:4].rjust(9)<br>print &quot;Changes Registered&nbsp;&nbsp; : %s&quot; % str(count).rjust(9)
<br>raw_input(&quot;\nPress Any Key...&quot;)<br><br><div><span class="gmail_quote">On 11/8/06, <b class="gmail_sendername">Luke Paireepinart</b> &lt;<a href="mailto:rabidpoobear@gmail.com">rabidpoobear@gmail.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Chris Hengge wrote:<br>&gt; alist = difference(image1,image2)<br>&gt; a = [b for b in 
alist.getdata() if b != (0,0,0)]<br>&gt; if len(a) != 0:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;Not the same&quot;<br>&gt;<br>&gt; is much slower then (9x)<br>&gt;<br>&gt; if im1.tostring() != im2.tostring()<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;something changed!&quot;
<br>&gt;<br>&gt; This loop itself is fairly slow by itself though.. I'm going to try<br>&gt; and see if there is a faster way.<br>Chris,<br>are you sure you know what a loop is?<br>The only loop here is in the list comprehension.
<br>'if' is not a loop.<br>'for' and 'while' are.<br>In computer science, it's important to be clear in your use of terminology.<br><br>It makes sense that my example was slow.<br>I didn't really think to try converting them to strings.
<br><br>Any time you're trying to compare pixel values, it's going to take a while,<br>cause remember, a 1024X768 image has 786,432 different pixels.<br>I think your tostring comparison may be your best bet.<br></blockquote>
</div><br>