Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7246

Re: cropping images

From Tom Anderson <twic@urchin.earth.li>
Newsgroups comp.lang.java.programmer
Subject Re: cropping images
Date 2011-08-19 11:36 +0100
Organization Eindhoven University of Technology
Message-ID <alpine.DEB.2.00.1108191129330.13074@urchin.earth.li> (permalink)
References <t77r47tvj51bpkie7a1s7jgc2f3bic6b5t@4ax.com> <HeydnaAZotk9RdDTnZ2dnUVZ_tCdnZ2d@posted.palinacquisition>

Show all headers | View raw


On Thu, 18 Aug 2011, Peter Duniho wrote:

> On 8/18/11 4:18 PM, Roedy Green wrote:
>
>> I have 1200 square PNG images of national flags in various sizes. I 
>> would like to crop them to rectangles.  I thought of writing a one-shot 
>> java utility for the purpose, then I wondered if I would be reinventing 
>> the wheel. Suggestions?
>
> There are _tons_ of image manipulating programs out there.  Nearly all 
> of them support some kind of cropping.
>
> The problem I found was that none provided an efficient workflow to deal 
> with a large number of images where each image needed to be cropped 
> differently (or at least, a large number of the set did).
>
> Irfanview and ImageMagick are both well-known utilities, and they offer 
> decent batch processing features.  But neither allow per-image 
> customization of the batch processing.

I wonder if ImageMagick could do this indirectly by using a mask. I'm not 
sure how you'd generate the masks, though.

Even if you could do this, driving ImageMagick with a shell script is 
still going to be easier.

> A few year ago I got tired of cropping thousands of images in Photoshop 
> one at a time (too much clicking), so I wrote a very simple utility to 
> do it for me.  The main feature of the tool is that it will crop, 
> optionally scaling the image, with a minimum number of clicks.
>
> If you're curious, you can check it out here:
> http://harveyosity.org/dragncrop/index.html

I suppose your problem is really not manipulating a large number of 
images, but entering a large number of crop rectangles. If you had the 
rectangles in a file already, bash+convert could do the job easily.

I've occasionally been pained by the absence of an easy way to script GUI 
interactions with images. I spend ages going through holiday pictures 
choosing which of N shots of a scene i want to post on Flickr; if i had a 
simple way of popping up two images and prompting myself to click the 
better one, i could use that as a comparison function in a sort, and 
largely mechanise the decision process.

tom

-- 
Punk's not sexual, it's just aggression.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

cropping images Roedy Green <see_website@mindprod.com.invalid> - 2011-08-18 16:18 -0700
  Re: cropping images Thomas Richter <thor@math.tu-berlin.de> - 2011-08-19 01:49 +0200
  Re: cropping images Roedy Green <see_website@mindprod.com.invalid> - 2011-08-18 17:34 -0700
    Re: cropping images Tom Anderson <twic@urchin.earth.li> - 2011-08-19 11:28 +0100
      Re: cropping images Roedy Green <see_website@mindprod.com.invalid> - 2011-08-19 17:13 -0700
    Re: cropping images Thomas Richter <thor@math.tu-berlin.de> - 2011-08-19 21:48 +0200
      Re: cropping images Roedy Green <see_website@mindprod.com.invalid> - 2011-08-19 17:14 -0700
        Re: cropping images Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-22 13:50 +0100
          Re: cropping images bugbear <bugbear@trim_papermule.co.uk_trim> - 2011-08-22 14:36 +0100
            Re: cropping images Jeff Higgins <jeff@invalid.invalid> - 2011-08-22 10:12 -0400
            Re: cropping images Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-22 15:13 +0100
              Re: cropping images bugbear <bugbear@trim_papermule.co.uk_trim> - 2011-08-22 16:19 +0100
  Re: cropping images Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-08-18 21:05 -0500
    Re: cropping images bugbear <bugbear@trim_papermule.co.uk_trim> - 2011-08-19 09:09 +0100
  Re: cropping images Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-08-18 20:29 -0700
    Re: cropping images Roedy Green <see_website@mindprod.com.invalid> - 2011-08-18 23:52 -0700
    Re: cropping images Tom Anderson <twic@urchin.earth.li> - 2011-08-19 11:36 +0100
      Re: cropping images Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-08-19 09:27 -0700
  Re: cropping images "John B. Matthews" <nospam@nospam.invalid> - 2011-08-19 07:31 -0400

csiph-web