Alley in Pisa, Italy

by Lars Kotthoff

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I need to scan a large volume of book covers and even though the scanner (HP) most of the time scans/auto-sizes, many are left with white/grey space on the sides.

What is the best way I can automate the "crop" on these images?

Is there some software/tools that automate this?

share|improve this question
    
lud0h, did you settle on a solution that worked best? –  user11222 Aug 20 '12 at 1:20
add comment

10 Answers 10

up vote 6 down vote accepted

I'm not sure there are any tools that will completely automate this process, unless you're willing to write a custom script.

I sometimes have to crop quite a few images at work, and one of the simplest tools that I have come across for this is a small image editor called IrfanView. It's not the prettiest of programs, but can do a crop and move on to the next picture with one mouse drag and three keystrokes. Here's how:

  • Install IrfanView and run the program.
  • Open the 'Options' menubar and select 'Properties/Settings...'
  • Select 'File Handling' from the list and uncheck the "Display 'Save'-Dialog" and "Ask to overwrite file for 'Save'" options.
  • Next, open the first image you want to crop.
  • Drag a square around the section to crop.
  • Press Ctrl+Y, Ctrl+S and then hit Space to move to the next image.
  • Repeat ad tedium.
share|improve this answer
    
Looks like for my work, this is the only solution. –  lud0h Nov 17 '10 at 12:52
    
It can't possibly be the only solution. There's a lot of software in the world, and this one seems (as it says) tedious. –  mattdm Nov 20 '10 at 14:16
    
@mattdm: It depends on how on how difficult it is to perform the segmentation. If there is a simple rectangular border of a single colour then the cropping operation is trivial (in fact irfanview can perform this automatically with Ctrl+Shift+Y). But if there is noise in the border--or worse, clutter--then then the cropping is not that simple, and many algorithms can struggle and make mistakes. Having said that, I've not used all software, so if anyone has a better solution then I'd be glad to hear it :-) –  ltn100 Nov 21 '10 at 23:04
    
This is a good solution but there are answers further down that actually provide the automation the OP was looking for. –  Chandler Jan 7 '11 at 20:06
    
Irfanview can do batch operations, including Crop. Go to File > Batch conversion/Rename. Click the Advanced button and set your crop. Then select the images to work on, and click Start Batch. –  hdhondt Aug 20 '12 at 1:52
add comment

ImageMagick, using the -trim operator. See: http://www.imagemagick.org/Usage/crop/#trim.

ImageMagick is free (and open source), and you can get pre-built binaries for Mac OS, Windows, or Unix from http://www.imagemagick.org/script/binary-releases.php.

share|improve this answer
2  
ImageMagick is really good for batch processing of images. –  Carles Nov 19 '10 at 22:36
    
This looks like it could produce a good solution when combined with the -fuzz operator. –  ltn100 Nov 21 '10 at 23:08
add comment

Photoshop has a function exactly for that:

Scan your cover (you can even scan multiple covers in one scan) In Menu: Automate > Crop and Straighten Photos

It automatically crop and fix the rotation of the photos in the current file. If multiple photos are found in the image, it will automatically split in several files. If you have ton of them, you can create actions to have the Crop and Straighten done on each of them in batch.

share|improve this answer
add comment

After having to Google this issue myself, I decided to write some instructions on how to do this with either Adobe Photoshop (if you already have that), or with GIMP (for free).

GIMP turned out to work better in my case. Complete easy-to-follow instructions can be found here: http://wp.me/p1YGyn-s9

This works for single scanned book covers (as in your case), or even with multiple images. Success!

share|improve this answer
add comment

XnView and NConvert are your friends. NConvert is a command-line tool to process images, with resize and crop functionality. XvView is a fast image viewer with batch processing capability. Once you do a crop in XnView, you can have it create a batch file for you that call NConvert on a bunch of images. It can do a lot more than crop at the same time, like resize and sharpen if you need it.

share|improve this answer
add comment

Another suggestion: Phatch, a photo batch processor that, among lots of other things, does cropping.

share|improve this answer
add comment

PHOTOSHOP ACTION

  1. Open Adobe Photoshop
  2. Open Image
  3. Select Windows -> Actions, then click "New Action". Press OK.
  4. Crop photo.
  5. Stop Action Recording
  6. Go to File-> Batch -> Choose Folder. Press OK.
share|improve this answer
    
A good idea, but this would assume that each image scanned has the same orientation, size and placement on the scanner. –  ckoerner Oct 10 '12 at 15:56
add comment

Fast Stone Photo ReSizer has always been my number one choice!

share|improve this answer
    
Thx for the tip. –  lud0h Nov 17 '10 at 12:51
    
You're welcome :) –  Rish Nov 17 '10 at 21:12
add comment

If its the same crop, you can use software like Lightroom to copy the crop (and crop angle) to as many photos as you want.

share|improve this answer
    
No its not the same size, the book covers may vary in length/width. –  lud0h Nov 23 '10 at 7:17
add comment

IrfanView degrades the emf files when cropped so it did not worked for me.

share|improve this answer
    
Degrades them how? –  MikeW Sep 18 '13 at 10:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.