Link to home
Start Free TrialLog in
Avatar of alank2
alank2Flag for United States of America

asked on

Automatically crop multiple photos on single sheet

I've been scanning photos, laying them out on the scanner bed and scanning the whole page which is usually 4-8 photos on a single sheet. I am looking for a program that will automatically crop the individule photos and save them as individule fles.

Thanks
Avatar of BongSoo
BongSoo
Flag of United States of America image

I know of several commercial applications that come with commercial scanners (Scitex Eversmart series, for instance, although I don't know how much longer they will be around since Kodak bought them out) that allow you to do this during the pre-scan phase (even let you set your highlight and shadow points, sharpening and other variables), but I don't know of any COTS software.

BongSoo
ASKER CERTIFIED SOLUTION
Avatar of Slynky
Slynky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Slynky,

At first, I thought you were saying that Photoshop can scan by itself, but then I found this: According to photoshop help (CS2): "Before you scan an image, make sure to install the software necessary for your scanner." I haven't played with this function yet, but if it works, its certainly one more good reason worth investing in Photoshop (along with scanning software). Good tip, thanks!

BongSoo
Avatar of Slynky
Slynky

BongSoo,

In PS, you can scan off their menu, I believe (but I never use it).  With my scanner (and most, I presume), I crank up Silverfast and then choose to "Scan to Photoshop".  Assuming, for example, that I had put 6 photos on the bed, one big document of 6 photos would appear.  Then, one need only choose Crop and Straighten to have it break the big image apart into 6 different ones.

Cheers!
Avatar of Jose Parrot
Hi,
Scanner low level I/O requires device drivers from the manufacturer anyway. If it is plug&play, than is because Windows already has such driver.

What Photoshop or any other application does, in its Aquire action, is search for twain32 or other specific denomination for a input device (scanner or digital photo camera) and run its dll.

CorelPaint, PaintShop Pro, besides PhotoShop, have script interpreter, so you can programmaticaly do all the job you need to crop the images.
The script will be something like:

Open (filenameIn)
crop(1,1,100,150)
save (filenameOut)

To avoid loading the same filenameIn several times, you can:

1 Open (filenameIn)
2 select(1,1,100,150)
3 copy(selection)
4 pasteNewDraw(clipboard)
5 save(NewDraw,filenameOut1)

then repeat steps 2 to 5 as much necessary, with a for...next loop.

Corel scripting is easy. Very like a Visual Basic more specific Paint commands.
PaintShop scripting is more complicated than Corel.
I don't have experiece with CS scripting.

Jose

JoseParrot,

The "Crop and Straighten" option in Photoshop doesn't require any scripting (that I'm aware of).  And judging from your script example above (not that I'm a "script kiddie"), it looks as if one item is being scanned and static pixel points are being used to force a crop.  (but I could be wrong).

In Photoshop, as many images as you can place on the glass can be scanned in one pass.  Then Photoshop, when processing under "Crop and Straighten", analyzes the borders and edges and breaks the images up into smaller documents AND straightens each one... as you might guess, laying 6 photos on the glass and having them all be perfectly straight is almost impossible.

So, in the other applications, can they, with scripting, do what I just described?  Which, I think, is the speedy process the questioner was seeking.

Cheers!
Hi,
A Corel script to do similar task is found at
http://www.corelmag.com/scripts/scrresp.htm

A begginers tutorial at
http://www.oberonplace.com/tutor/page1.htm

A tutorial on script for PhotoShop at
http://www.photoshopsupport.com/tutorials/jennifer/photoshop-scripts.html

Hope it helps.

Jose
Avatar of alank2

ASKER

I have Photoshop CS and was aware of the autocrop feature. If I remember correctly, you must name each file as you save it so it's not entirely automatic but it does a great job. I was actually looking for a quick way to crop about 2000-3000 pages, each full of photos.
Thanks
alank2,

Yeah, I'm afraid that's the rub.  It would be a fairly smooth process to lay a page on the scanner, invoke a Photoshop action that started the scanner and then ran a "Crop and Straighten" on it, and then each document automatically file itself away with a one-up sequence number tacked onto a generic filename.  It's that filename generation "miracle" that someone else will have to provide an answer for.  (sorry)

Good luck !

Cheers!
Hi,

The idea of using separate selections is to provide a way of save each image as a separate file, with the name you want. Of course, you can "Crop and Straighten" (by the way, this command is itself a script) and after each image is put in a own window, you can name each object whatever you want and save them.

Photoshop accept 3 languages for scripting: JavaScript, if you intend to use the script in both Mac and Windows environments; AppleScript if you intend to use the script in Photoshop and Illustrator in MAc, or VBScript to do the same in Windows.

Let me suggest to take a look at:

"Using Automation, Actions and Scripts" paper to strategies:
http://www.fmctraining.com/conferencenotes/su_ps3.pdf

and the Adobe's Photoshop Script Guide for sintax guidance:
http://partners.adobe.com/public/developer/en/photoshop/sdk/PhotoshopScriptingGuide.pdf#search='photoshop%20script%20manual%20user%20guide'

By looking at these guides, you can evaluate the complexity and amount of programming efforts involved in the project. Thus the decision could be based on real facts. May be a partial automatization can be enough for your purposes or may be it is cheaper and faster to hire a guy to help you...

Jose
I dont see any reason why you couldent use a batch to do this... Just record a action, starting with the import twain 32, import settings, scan, Crop and Straighten, save files, close files...

Although you may have to use a script if any of these options are not picked up in the action recorder. Like if it doesent record the resolution settings in the scan or somthing..

- Just my 2 cents :-)
Ben,

"Yeah, I'm afraid that's the rub.  It would be a fairly smooth process to lay a page on the scanner, invoke a Photoshop action that started the scanner and then ran a "Crop and Straighten" on it, and then each document automatically file itself away with a one-up sequence number tacked onto a generic filename.  It's that filename generation "miracle" that someone else will have to provide an answer for."

I think we agree on the initial part of the procedure the questioner is asking for, but you might expand on your "save files, close files..." comment if it can be automated.  If it can't be automated, then this territory is probably already covered above.  *shrug*  I can't see a way of using PS to automatically assign a filename and save from the starting point we agree is possible.  PS can take an EXISTING filename and batch it out to a new name (with alterations) but I don't see how from an action like we're discussing.  (but I've never been great at actions... *wink*)

Regards,
Slynky
Avatar of alank2

ASKER

Thanks for your help everyone. I'll just use Photoshop