If you want to make an editor which does this, then you may want to take a look at javascript libraries which provide such functionalities. It&#39;s a very easily pluggable module from YUI javascript library which allows you to crop with a very easy interface. Here is an example : <a href="http://developer.yahoo.com/yui/examples/imagecropper/feedback_crop.html">http://developer.yahoo.com/yui/examples/imagecropper/feedback_crop.html</a><br>
<br><br><div class="gmail_quote">On Sun, Mar 1, 2009 at 1:32 PM, Noufal Ibrahim <span dir="ltr">&lt;<a href="mailto:noufal@gmail.com">noufal@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<div class="Ih2E3d"><br>
On Sun, Mar 1, 2009 at 1:25 PM, Arunabha Adhikari<br>
&lt;<a href="mailto:arunabha.adhikari@gmail.com">arunabha.adhikari@gmail.com</a>&gt; wrote:<br>
&gt; Dear friends,<br>
&gt;<br>
&gt; I am a beginner in Python programming. I am not a computer professional I am<br>
&gt; a physicist. I was trying to write a code in python for my own research<br>
&gt; which involves a little image processing. All I need to do is to display an<br>
&gt; image and then select a region of interest using my mouse and finally crop<br>
&gt; out the selected region. I can do this in Matlab using the ginput()<br>
&gt; function. I tried using PIL. But I find that after I issue the command<br>
&gt; Image.show(), the image is displayed but then the program halts there unless<br>
&gt; I exit from the image window. Is there any way to implement what I was<br>
&gt; planning. Do I need to download any other module? Please advise.<br>
<br>
</div>If you want to do image cropping non-interactively (ie. using a script<br>
or someting) I would recommend that you use something like &#39;convert&#39;<br>
that comes with the ImageMagick utilites. You can say something like<br>
  convert original.jpg -crop &lt;specificiation&gt;  output.jpg<br>
 and you&#39;ll get what you want.<br>
<br>
If you want to interactively decide what piece you want to crop, I<br>
think it would be better to use a graphics editing program like the<br>
GIMP.<br>
<br>
If you&#39;re trying to implement a graphics editor in Python, I think it<br>
will be quite hard. Maybe if you can explain your requirements a<br>
little more, I might be able to help. I&#39;ve used PIL a few years ago<br>
and have some memory of what it provides.<br>
<br>
Ta ta.<br>
<font color="#888888">--<br>
~noufal<br>
_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</font></blockquote></div><br>