Crop And Straighten Photos - Changing parameters / Editing Script

Hi. I am currently using the Crop and Straighten Photos automation to crop scans of 10 to 12 maps that are scanned on a large flat bed scanner.
A lot of the plans have rough edges and aren't always completely square. Is it possible to allow a tolerance (eg. 5mm, or 20pixels etc) before cropping each image? I've tried editing a .jsx script that was submitted on this forum (the script was designed to crop more border from the image, as opposed to leaving more image) but this simply added a black border around my image as it enlarged the canvas side once the image had already been cropped.
Instead, I need the selection area to be increased prior to cropping.
Does anyone have an idea on whether I can get a script to do what I am looking for?
Furthermore, if two or more of the maps are joined at all by a hair or a frayed string of canvas from the map's backing then the Crop and Straighten Photos automation considers it to be one map and crops it as only one image. Is there a way of increasing this tolerance to make the cropping process more brutal so to speak?
Any help would be greatly appreciated.

Hi Christoph.
I'd realised that once i made the post, and yes, the duplicate and flatten parts in the process are unnecessary, they have been removed. The action is set up now so that once it crops the individual images, it closes the main image down, and then saves and closes the individual images. It is setup to save and close 12 images (as this is the most there will ever be in my case), and I set the action to post errors to a log rather than halt, so if there are less than 12 files it will continue and just post an error in the file. It works really well now thanks!!
I then run an action that options each individual file and brings up the "save as" dialog. This is a chance to perform a QA on the image and to save it as the correct name on the plan.
However, the action is currently setup so that it creates a complete new image each time and closes the original. This is the only way I can make the "Save as" dialog point to the new destination as if I simply open and "save as" the original files, the default folder always resets back to the original folder where the cropped images are. I'll have to investigate other methods of opening and renaming the images to help speed this part of the process up.
Thanks so much for your effecient responses. They have been a great help!
Cheers.

Similar Messages

  • Scripting and Crop and Straighten photos

    photoshop CS3 has this neat feature "Crop and Straighten photos" which is very helpful in cleaning up scanned images (remove the black border) but is there a way to turn it into an action ?
    i would like to apply this against many images (lots of files) in an automated way but being new to scripts/actions, I haven't had much success since this command creates a copy of the original.
    is there an action that will help me batch remove the black border from all my images either using this CS3 command or another. thanks

    OK, I'm giving back: here's an adaptation of Paul's script that uses recursion to iterate through all subdirectories. (Note that I also changed the file name suffix to a "static" (non-sequenced) value, as well as the name of the output folder, since I am using this to process single-photo image files. The original lines are commented out.) To implement the recursion, I defined the "main" functionality in a function ("ProcessFiles") that calls itself when encountering a subfolder.
    Here's the full script. Hope this helps someone!
    ===========================
    // Prompts the user for a directory, and then recursively processes each image
    // in that directory and all subdirectories by executing the "Crop and
    // Straighten" command. Images are saved with a specified suffix in a
    // designated subfolder.
    // Adapted from a script provided by "Paul R." in the "Photoshop Scripting" forum
    // http://www.adobeforums.com/webx?7@@.59b54905/2
    // TIP: Hold down the "Alt" key while running this script to instruct Photoshop
    // to treat the image as a single photo. (For more information, see:
    // http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WSfd1234e1c4b69f30ea53e4 1001031ab64-762e.html)
    #target Photoshop
    app.bringToFront;
    var inputFolder = Folder.selectDialog("Please select folder to process");
    if(inputFolder != null){
    ProcessFiles(inputFolder);
    function ProcessFiles(inFolder) {
    // var fileList = inFolder.getFiles(/\.(jpg|tif||psd|)$/i);
    var fileList = inFolder.getFiles();
    var outfolder = new Folder(decodeURI(inFolder) + "/Cropped");
    if (outfolder.exists == false) outfolder.create();
    for(var a = 0 ;a < fileList.length; a++){
    if(fileList[a] instanceof File && fileList[a].name.match(/\.(jpg|tif||psd|)$/i)){
    var doc= open(fileList[a]);
    doc.flatten();
    var docname = fileList[a].name.slice(0,-4);
    CropStraighten();
    doc.close(SaveOptions.DONOTSAVECHANGES);
    var count = 1;
    while(app.documents.length){
    // var saveFile = new File(decodeURI(outfolder) + "/" + docname +"#"+ zeroPad(count,3) + ".tif");
    var saveFile = new File(decodeURI(outfolder) + "/" + docname + "-CR"+ ".tif");
    SaveTIFF(saveFile);
    activeDocument.close(SaveOptions.DONOTSAVECHANGES) ;
    count++;
    else if (fileList[a] instanceof Folder) {
    // alert("Folder: " + fileList[a]);
    ProcessFiles(fileList[a])
    else {
    // inappropriate file type, or null
    function CropStraighten() {
    function cTID(s) { return app.charIDToTypeID(s); };
    function sTID(s) { return app.stringIDToTypeID(s); };
    executeAction( sTID('CropPhotosAuto0001'), undefined, DialogModes.NO );
    function SaveTIFF(saveFile){
    tiffSaveOptions = new TiffSaveOptions();
    tiffSaveOptions.embedColorProfile = true;
    tiffSaveOptions.alphaChannels = true;
    tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
    activeDocument.saveAs(saveFile, tiffSaveOptions, false, Extension.LOWERCASE);
    function zeroPad(n, s) {
    n = n.toString();
    while (n.length < s) n = '0' + n;
    return n;

  • The trial version of Adobe photoshop 13 does not have the Crop And Straighten Photos option  under file and automate....... all it has is "Fit Image".......   would really like to have that feature.... is it something they eliminated?

    I am scanning in many old photos and there are several photos on one page.... I read about a feature that was suppose to be available under adobe photo shop elements 13 that would allow multiple cropping under the file, automate, Crop And Straighten Photos....... the only thing that displays on the version 13 that I have is "Fit Image"...... which doesn't help me......    have they removed this tool or do you have to crop and save one image at a time?    Thanks for your help?

    You want Image>Divide Scanned Photos

  • Crop and Straighten Photos in CS6

    I open a 8"x10" jpeg or any other photo then go over to FILE menu and drop down to AUTOMATE then over to CROP and STRAIGHTEN PHOTO,S
    Now what happens is that three other copies appear copy ,copy  2 copy 3 .
    My original is OK at 8"x10" followed by the copy being 5"X7" then copy2 is about 1/2"x2" and copy 3 is about 3/4"x3/4"
    I think this is being caused by interaction with CS5 as the same happens there.
    CS4 is all OK this not being affected.
    Now in CS4 i can crop and straighten but in CS5 and CS6 nothing can be done.
    Kip

    OK, here's the scoop:  the feature in File>automate>crop and straighten is designed for those who scan in several photos with white space between them. It will make it's best attempt at separating each photograph by looking for the white space around them. It will then crop each photo to the edges it determines and make each straight based on the detected edge.
    It is not designed to straighten the image in a photo.  If you run this on a photograph, it is looking really hard for white space and will make its best attempt to separate what it thinks are independent items or photos and save each to a file.
    If you want to straighten an image, go to the ruler tool and draw a line and choose straighten layer to get a rotation only, or go to the crop tool and select straighten, and draw a line that you wish to be the horizontal. This one will crop also.
    I hope that clears up the issue.
    Pattie

  • Photoshop Help | Crop and straighten photos ❘ CS6

    This question was posted in response to the following article: http://helpx.adobe.com/photoshop/using/crop-straighten-photos.html

    Russell Brown (Senior Creative Director at Adobe) Tips and Techniques:
    http://av.adobe.com/russellbrown/CropAndStraightenSM.mov

  • Is there a way to adjust crop borders on Crop and Straighten?

    I'm trying to use Photoshop CS3 to crop and straighten images of postage stamps.  E.g., place a bunch of stamps on the scanner bed and scan them as one image.  Then use Automate/Crop and Straighten Photos to create separate workspaces each with a single stamp image, cropped and rotated appropriately.  This almost works; the problem is it often crops the stamps too closely, cutting off the perforations.  The rotation is not always perfect either.  For example, for the above image I get:
    These two are pretty good except the perforation tips are trimmed off.
    This one is a disaster
    So I'm thinking if there were some way to specify how tightly the images are cropped, it might help solve the problem.  Any other suggestions?

    We now have a solution.
    http://forums.adobe.com/thread/778507?tstart=0

  • Crop and Straighten Images Settings

    I'm trying to use Photoshop  CS5 to crop and straighten images of postage stamps.  E.g., place a  bunch of stamps on the scanner bed and scan them as one image.  Then use  Automate/Crop and Straighten Photos to create separate workspaces each  with a single stamp image, cropped and rotated appropriately.  This  almost works; the problem is it often crops the stamps too closely,  cutting off the perforations.
    Here are a few once cropped.
    So is there a way to set the border?  Thanks in advance.

    Using  paths and the stroke paths function, like in this video, should get you
    decent results with the crop and straighten function.
    Look down the page under CS2 and Crop and Straighten updated:
    http://www.russellbrown.com/tips_tech.html
    This:
    To this:
    MTSTUNER

  • Photoshop CS6: Auto Crop and Straighten work wrong (EDIT)

    Hello together,
    I use the Creative Cloud for Students (German) and have make for some days an update of my programs like Photoshop CS6.
    Since today the option of automatic crop and straighten makes some big problems.
    Edit:
    I make following Steps:
    1.) Duplicate the level and make the first level invisible.
    2.) I use the crop tool to mark the details which I want to have free.
    3.) Click on the mask symbole in the level section
    4.) At the end I click "auto crop and straighten"
    It makes 39 little pics out of one. This isn't what I want to do and it is since the last update.
    --> Edit end.
    I hope someone understand my problem and can help.
    Greetz
    Markus from Germany

    Since your question asks "Could we ..." I would like to state that "we" cannot do such a thing. "We" here in this forum are Lightroom users, and not Adobe employees. If you'd like to make a request for a specific new feature in Lightroom, there is a link right here on the front page of this forum to the proper place to make feature requests.

  • Crop and Straighten not separating photos but is producing a single image file.

    I have been trying to use crop and straighten on multiple scanned images and am getting very disappointing results. Instead of separating each of the images with white space around them into individual files, I am getting back a single image of the entire scanned area. Is there a setting I am missing? When I was using CS3 it was no problem, it would have its occasional glitches, but nothing major. CS6 isn't even trying to separate the images.

    Could you please post one of the images (or a lores version of it) that produce unsatisfactory results?

  • Lightroom 4 and 5 my program constantly freezes while using the crop and straighten tool

    In both Lightroom 4 and 5 my program constantly freezes while using the crop and straighten tool with horizontal images. Im running Lightroom on a Quad-Core Intel Xeon Mac with 32 GB of memory with OS 10.8.4, this problem has gotten worse and worse to the point where the crop tool is unusable. Please help!

    Alright,
    no replies so far! Anyways, here's some more information which is leading me to the conclusion that the bug causing the effect described above is a combination of Apple's SMB implementation of Mavericks and the way Lightroom is actually using SMB network access:
    I did another trial by connecting a USB hard drive to the USB port of my router (Netgear). The connection is quite slow, but moving one of the folders in question (see my 1st post above) to the shared drive connected to the Router made Lightroom on my Windows machine to see the photos again, when I told Lightroom where to find the moved folder!
    Everything was working as expected, on the Windows machine again! Moving the folder back again to the Mac Mini fileshare was causing Lightroom on the PC to get blind again for the pictures trying to sync or import. However, accessing and modifying a photo was possible again, like it was before the trial. So it's only the sync and import function having a problem!
    I also did some trial in re-building ACLs and access rights on the file server with no luck. So there's got to be a functionality in sync and import of Lightroom which is using a certain SMB feature which is not supported by Apple's SMB implementation!
    Any thoughts or hints?
    Thanks!

  • CS6 crop and straighten causes error message - "An error has occurred"

    Running CS6 on a windows 7 desktop machine. When I try to crop and straighten a 4 image scanned image I get "An error has occurred" I do not get this error on my laptop. I have uninstalled and re-installed CS6 with no change in error message. I have reset the preferences and still the same error. Any suggestions?

    Starting Photoshop without plug-ins solved the problem. Is there a way to
    find out which plug-in is the problem? Copy them to another folder and add
    them one at a time back into the plug-in folder until the problem re-occurs?
    Bob
    On Sun, Feb 22, 2015 at 6:17 PM, Benjamin Root Photography <

  • Crop and straighten

    Crop and straighten tool no longer work correctly in PSE 11, windows 7.  Problem surfaced in the last week.  Have done a complete reinstall and problem still exists.  Appers to be an instability error.

    Try Edit> Preferences> General> "Reset Preferences on Next Launch" and restart PSE.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • 16 bit Tiff  crop and straighten display issues

    Still having the same old issues with 16 bit exports when crop and straighten have been applied to a file. Re import the n zoom or use loupe results in artifacts.
    Anyone else??

    I've had this problem with images saved as 8-bit scans.
    Are you using any compression in the TIFs? I scanned using Nikon Scan 4, cleaned up a bit in Photoshop 7, reduced the bit depth to 8-bit, and saved at TIFs with embedded colour profile using ZIP compression, Macintosh byte order.
    This used to work with Aperture 1.5.6, but with Aperture 2.0 I see a kind of offset pattern, so a vertical line looks like this:
    If export the master TIF, open it in Photoshop (where it looks normal) and save it with no compression Aperture displays it properly.
    (I'm still using Tiger, so I don't think this is an OS issue.)

  • 3.2 image rendering issues when cropping and straightening

    Upgraded to 3.2 - all works well so far but have noticed that the top 1/3rd of image disappears during the cropping and straightening processes in the viewer window, but only with portrait/vertically oriented images.  Anyone else have that issue?

    Still on Snow Leopard here and I just tried this. Sorry to report it worked OK for me. I tried both  straightening then cropping and then the reverse. No problems.
    Does it happen on all portrait images? Could you post a screen shot of the results?
    There wasa report of something similar a while back. Here's the thread:
    After straightening/cropping 1/2 or 3/4 of displayed image is blacked out!  Don;t know how that turned out.
    regards

  • How to crop and sharpen photos

    Where do I find information on cropping and sharpening photos  that I want to use on projects?  Thanks for your help.

    Those functions are usually included with your software to provide those functions.  It should have a full help facility. 
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

Maybe you are looking for

  • My ITunes works perfectly except for the ITunes Store which gives me the following message "I Tunes could not connect to the I Tunes Store. An unknown error ocurred (-3221)

    Whenever I try to connect to the I Tunes Store, I get the following message " I Tunes could not connect to the I Tunes Store. An unknown error occcured (-3221). Make sure your network connection is active and try again. But my network connection is a

  • IDOC in status 2

    Hi, I am trying to post an IDOC through R/3 to XI system which finally converts into a file and goes to 3rd party. When I am posting IDOC in R/3 I am getting 02 status and error as: Communication error when sending with HTTP and Status as Error Passi

  • Vector objects are displayed incorrectly

    Hi! I am using Flash CS6. I need to draw a small vector icons (about 14x14). Simple example: I draw a rounded rectangle with corner radius  "2". Here is a resulting image from Flash (14x14, 100% scale): As you can see, top corners are not drawed corr

  • Installation issue with ITUNES 7.6

    I'm unable to access ITUNES after attempting to upgrade to version 7.6. Says cannot run because some files are missing. I'm trying to resolve without losing my music library. Is there an easy way to repair without deleting the music library?

  • Access Enforcer/ CUP   - Export/ Import?

    Hi, I wanted to know if there is a export functionality in the access enforcer/CUP (GRC v 5.2)?? I wanted to export the workflows and other items I have created outside the current environment and import it to a different environment. Is this actuall