[BangPypers] Questions regarding Image cropping

Bharath Keshav bharath.keshav at gmail.com
Sun Mar 1 14:29:53 CET 2009


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's a very
easily pluggable module from YUI javascript library which allows you to crop
with a very easy interface. Here is an example :
http://developer.yahoo.com/yui/examples/imagecropper/feedback_crop.html


On Sun, Mar 1, 2009 at 1:32 PM, Noufal Ibrahim <noufal at gmail.com> wrote:

> Hello,
>
> On Sun, Mar 1, 2009 at 1:25 PM, Arunabha Adhikari
> <arunabha.adhikari at gmail.com> wrote:
> > Dear friends,
> >
> > I am a beginner in Python programming. I am not a computer professional I
> am
> > a physicist. I was trying to write a code in python for my own research
> > which involves a little image processing. All I need to do is to display
> an
> > image and then select a region of interest using my mouse and finally
> crop
> > out the selected region. I can do this in Matlab using the ginput()
> > function. I tried using PIL. But I find that after I issue the command
> > Image.show(), the image is displayed but then the program halts there
> unless
> > I exit from the image window. Is there any way to implement what I was
> > planning. Do I need to download any other module? Please advise.
>
> If you want to do image cropping non-interactively (ie. using a script
> or someting) I would recommend that you use something like 'convert'
> that comes with the ImageMagick utilites. You can say something like
>  convert original.jpg -crop <specificiation>  output.jpg
>  and you'll get what you want.
>
> If you want to interactively decide what piece you want to crop, I
> think it would be better to use a graphics editing program like the
> GIMP.
>
> If you're trying to implement a graphics editor in Python, I think it
> will be quite hard. Maybe if you can explain your requirements a
> little more, I might be able to help. I've used PIL a few years ago
> and have some memory of what it provides.
>
> Ta ta.
> --
> ~noufal
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090301/deb0d523/attachment.htm>


More information about the BangPypers mailing list