• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Straighten and crop ca 2000 photos

New Here ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

I'm currently using Photoshop Elements and I'm trying to straighten and crop ca. 2000 photos which have been digitized from paper copies by placing under a DSLR. I would like to make sure I haven't missed a method/solution. So, am I correct with the assumption that I have these options:

 

  1. Automatically straighten and crop one by one in PSE editor (no batch editing in PSE)
  2. Automatically edit in a batch in PSE editor with Elements+
  3. Automatically edit in a batch in free trial of Photoshop (or Lightroom?).
  4. Create an action script in free trial of Photoshop and import that to PSE and run it in Elements+

 

I have already tried method #2. I have installed the Elements+ and followed the instruction on this video (https://www.youtube.com/watch?v=x7XH0nt2L1g). Unfortunately, I encountered a problem when I followed the instructions. This batch editing method will leave all the edited and all the original images open in PSE editor. I haven’t tried a large batch yet because I don’t know what the limit for open images is but I doubt PSE will handle hundreds of photos at once. In the method #2 I was using “Image – Divide scanned photos” -script for a folder. I have tried my best to add scripts in Elements+ batch which would also achieve the closing of images and would create this desired work flow:  

“open one image in folder –> edit –> save the image as a copy to different folder -> close the images –> open next –> repeat till all done in the folder”.

So I think my questions would be:

1. Do I have all the options mapped or is there other ways?

  1. What is the max number of images open at the same time in PSE editor?
  2. Would I be able to write a script in free trial of Photoshop and import it to PSE and then run it in Elements+ to achieve the desired work flow above?
  3. Would I be able to batch edit my photos better in free trial of Photoshop/Lightroom?

 

TOPICS
How to

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Sep 29, 2024 Sep 29, 2024

Votes

Translate

Translate
Community Expert , Sep 30, 2024 Sep 30, 2024

Try this revision of the script:

test on just a few scans before doing hundreds

and it should close all the documents when finished

 

 

 
 
//

/*

<javascriptresource>

<name>Batch Divide Scans save as JPG...</name>

<about>divide scans and save as JPG</about>

<category>Layers</category>

<menu>automate</menu>

</javascriptresource>

*/

//
#target Photoshop
app.bringToFront;
var inFolder = Folder.selectDialog("Please select folder to process");
if(inFolder != null){
var fileList = inFolder.g
...

Votes

Translate

Translate
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2024 Sep 30, 2024

Copy link to clipboard

Copied

Maybe the script in this thread will work:

https://community.adobe.com/t5/photoshop-elements-discussions/help-batch-command-for-quot-divide-sca...
___________________________

Thanks Jeff! That seems to be aiming at a pretty much the same thing which I'm trying to achieve. The only difference being that I would like the output to be jpeg. The script in the earlier discussion looks super scary with weird boxes etc. I'm not sure if I can edit the script and execute it correctly in order to get jpeg. 

Is the text below accurate copy of your script Jeff? How it would need to be edited in order to have jpeg output. I can't open the first original discussion with jpeg output any more. Will this script close all the edited images after they are done or is this going to have the same problem of hundreds of open images in PSE after the script is run? 

------

 

//
/*
 
<javascriptresource>
 
<name>Batch Divide Scans save as PSD...</name>
 
<about>divide scans and save as PSD</about>
 
<category>Layers</category>
 
<menu>automate</menu>
 
</javascriptresource>
 
*/
 
//
 
#target Photoshop
app.bringToFront;
var inFolder = Folder.selectDialog("Please select folder to process");
if(inFolder != null){
var fileList = inFolder.getFiles(/\.(jpg|jpeg|tif|tiff|psd|png|bmp)$/i);
var outfolder = new Folder(decodeURI(inFolder) + "/Edited");
if (outfolder.exists == false) outfolder.create();
for(var a = 0 ;a < fileList.length; a++){
if(fileList instanceof File){
var doc= open(fileList);
doc.flatten();
var docname = fileList.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) + ".psd");
SavePSD(saveFile);
activeDocument.close(SaveOptions.DONOTSAVECHANGES) ;
count++;
}
}
}
};
function CropStraighten() {
executeAction( stringIDToTypeID('CropPhotosAuto0001'), undefined, DialogModes.NO );
};
function SavePSD(saveFile){
psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = true;
psdSaveOptions.alphaChannels = true;
psdSaveOptions.layers = true;
activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
}
 
function zeroPad(n, s) {
n = n.toString();
while (n.length < s) n = '0' + n;
return n;
};
 
****************************************'

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

What format are the DSLR images?

1.  There is another method:  Use the Elements Camera Raw Editor to open the files.  If you shot in raw, you could open multiple photos from the Organizer and they will open in Camera Raw.  You can batch crop them in that Editor.  If the files are jpeg, you can use the Elements Editor File menu to open multiple files from the Open in Camera Raw option.  But do you truly want to batch crop the files?  What kind of edits are you trying to make - removing edges or something else?  And did you set up the camera so precisely that the edited image sizes will be precisely the same?

2.  Probably, but I'm not sure.

3.  Again, I have to ask you what kind of edits you are performing?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Copy link to clipboard

Copied

I guess my question is whether you are trying to straighten just the scan of one or more photos in a single image file, or whether you are trying to straighten something like a crooked horizon in each image, automatically.  Jeff's script will presumably perform the former, but not the latter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2024 Sep 30, 2024

Copy link to clipboard

Copied

I have shot them in RAW + Jpeg so I have both available. I think I wasn't explaining the problem quite right. The key problem is that the ca. 2000 photos were quickly placed on to a general slightly bigger area being photographed to speed up the process. As a result the digitized photos are not straight and background is showing. Every single one is uniquely crooked so I would need the software to identify the background and based on that the photo straightened and background cropped. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2024 Sep 30, 2024

Copy link to clipboard

Copied

TJM73,


What version of Photoshop Elements and operating system are you using?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2024 Sep 30, 2024

Copy link to clipboard

Copied

"What version of Photoshop Elements and operating system are you using?"

****
I've got Photoshop Elements 2024 and Windows 10. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2024 Sep 30, 2024

Copy link to clipboard

Copied

Try this revision of the script:

test on just a few scans before doing hundreds

and it should close all the documents when finished

 

 

 
 
//

/*

<javascriptresource>

<name>Batch Divide Scans save as JPG...</name>

<about>divide scans and save as JPG</about>

<category>Layers</category>

<menu>automate</menu>

</javascriptresource>

*/

//
#target Photoshop
app.bringToFront;
var inFolder = Folder.selectDialog("Please select folder to process");
if(inFolder != null){
var fileList = inFolder.getFiles(/\.(jpg|jpeg|tif|tiff|psd|png|bmp)$/i);
var outfolder = new Folder(decodeURI(inFolder) + "/Edited");
if (outfolder.exists == false) outfolder.create();
for(var a = 0 ;a < fileList.length; a++){
if(fileList[a] instanceof File){
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) + ".jpg");
SaveJPEG(saveFile, 12);
activeDocument.close(SaveOptions.DONOTSAVECHANGES) ;
count++;
}
}
}
};
function CropStraighten() {
executeAction( stringIDToTypeID('CropPhotosAuto0001'), undefined, DialogModes.NO );
};
function SaveJPEG(saveFile, jpegQuality){
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality; //1-12
activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
}
function zeroPad(n, s) {
n = n.toString();
while (n.length < s) n = '0' + n;
return n;
};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

"

Try this revision of the script:

test on just a few scans before doing hundreds

and it should close all the documents when finished"

*****

 

Thanks a lot Jeff! 

I ran it with a folder with a few photos and it worked great! How many photos do you think I could do at once? How many can the automation handle? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

By the way, what quality level does the automated script save the Jpegs?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

The JPEG Quality level is set for 12

 

It should be able to handle all 2000, since each scan is closed after dividing and saving.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

LATEST

Great. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines