Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to batch process user select crop of multiple images?

Status
Not open for further replies.

andas

Technical User
Dec 18, 2001
6
US
I need to perform the following sequence on multiple files in a folder (up to 1,000).
Open file
Set levels
Select crop area (different for each image)
Crop
Save

Automating this is no problem except for the steps allowing the batch process to be paused while the crop area is selcted. Inserting a stop causes the batch process to halt. Is there a way to do what I want to do? If the select crop command were modal I could do it. If there were a "pause X seconds for input" command I could also do it but everything I have tried so far suggests that an inserted stop, if activated, ends the batch process.
 
Assuming you're using 5 or later, I trust you are recording to an "Action."

Why not just map 2 Actions: everything before the crop and everything after. Then map each of these 2 actions to a different key and you're off.

-Dave
 
I am running PS Ver 6.01 and have tired exactly what you suggest but this does not solve the problem.

If I write an action to open a file I still have to follow the manual process of remembering what the filename is for the next file I want to process (they are all numerical but not sequential), manually select that file name in the open file select box (or I can open up to 25 files at once), and then open the file. If I write an action to automatically open a file (i.e. file#1) and run it again, it opens file#1 again, not file #2 (or #16 - whatever the next file in the directory is named). The only way to open files sequentially is to use the batch automation (i.e. to put my action 1 into a batch action set) but, once a stop of any kind is used the batch is stopped and the whole thing starts back at file #1 if restarted.

The reason I want to access the files sequentially by a batch file is that manually selecting the file to be opened (even with an action key)is time consuming as you must scroll through the file list in the source folder which may contain hundreds of files to be processed and find the next file number in the list.

One alternative I have considered is to find a way for the Photoshop batch file (or an action within that batch process) to move or delete the original file from the source file folder after the modified (processed) file is saved in a destination folder. This would make it much easier to identify the next file (or block of files to be opened and processed - they would then just be the first files still listed in the source directory). However, I have not been able to find a way to move or delete the original file thru PS. I know this would not normally be desireable but is it possible?
 
Yeh, good idea but it still does not work. If I write over a file it still retains the same filename and nothing in the open file list indicates which files have been processed so I still have to search through the file list to identify the next file by name and then open it. I could rename the file when I saved it (i.e just add X to the strat of the name so it moves to the end of the directory list when I next go to open). However, here again there are two choices: use "save as" which does not allow auto filename additions (i.e. I would have to use mouse or keystrokes to select the beginning of the existing silename and add an X and do this for each file) or use batch processing (which does allow auto addition of some text to the front of a filename) but this puts me right back in the same do loop. Batch files terminate any time you stop to crop an image.

I wish I could do the image processing in Access. Programming this kind sequencetial batch process with a pause to allow user inputin Access would be a no brainer but I could, of course, not use essential tools such as levels , marqueee and crop from Photoshop. I guess, for once Microsoft has something, powerful and flexible automation programming, over Adobe.
 
Here's some thots:

1) Saving:
When I've done something like this it was a copy of the entire folder (so I'm working on copies, not the originals) and I had them all open, so instead of figuring out how to open (previous one + 1 ... or whatever) it would SAVE this one and CLOSE it to reveal the next one. Automatically I'd be on the next one. I did this one time with 168 images. Perhaps you do could 100 at a time.

2) Cropping:
The cropping is a toughie. I think the only to do this is to have ACTION1 stop to let you CROP then you invoke ACTION2 which does whatever you wanted after the CROP including SAVE and CLOSE.

Or ACTION1 starts AFTER the CROP, and stops BEFORE it. Only need 1 ACTION then.

-Dave
 
What do you mean for once? Adobe just got into this scripting thing a little while ago and IMO spanks microfluffy.

In your actions pallet, to the left of your "crop" command, there is a checkbox and to the right of the checkbox is another grey square used for toggling the dialoge box assosiated with that command on or off. Turn yours ON. Your action will now pause at the crop command waiting for you to hit enter to confirm the crop at which point your action will finish it self off.

enjoy :)
 
Sorry Jaquan but the crop command is not "modal" so there is no dialog box and, therefore, no grey box to check/uncheck. That was the first thing I looked for.

My Microsoft vs Others comment was based on software in general (e.g. Outlook security, & Front Page)not just the automation modules.
 
gee, thats funny, cause i just did it with a whole folder. The dialoge command for the crop does not actually bring up a dialoge, it just sets the crop area to the size it was when you recorded it allowing you to further edit it. Hitting enter will allow your action/batch to finish.
 
Thanks ElEye. Opening a slew of files, processing these with an action that includes a stop for crop, then going back to explorer to move these processed files into another folder before opening a slew more files is what I had planned as an ineficient work around. Since the files are 1.5-3Meg LZW compressed TIFs I can only get about 150 or opened without running into RAM limits and the slow down of using disk memory swapping. The job I am starting on has two folders each with over 2,000 files so I guess this is not too bad (although I hate to tie up memory unecessarily). I will probably need to take a break after every couple of hundred files anyway (since I have to set levels, crop marks etc manually anyway).

One other problem I have found is that PS only allows you to select up to 25 files to open through the regular file menu (this should be configurable somewhere but I sure as h** cannot find where). The work around for this is OK. Just wrote an Action to just open a file and size adjust it to fill available screen space, and then ran this action as as a batch process. Takes a little while to open 100 or so files but works OK.
 
Ahah! Thanks Jaquan, you are right. The CROP command does indeed behave as a modal tool. I was using the MARQEE tool (because it allows the crop to be set with constrained proportions which the crop toll does not). I wanted to use a constrained proportion because the final output of the files is for web use and the automated web page generator (a much modified ImageAXS/Access engine) that I use to produce the html files would not produce html that used the actual dimensions of the images (I prefer to show images at actual size pixel-wise). However, I have just changed that, at least in part. As of a couple of weeks ago, the full image pages of my website are generated on the fly by a cgi script that reads the actual dimensions of each jpg and use thse to set the screen image size (This reduced my server usage by 60 Megs and 4,000 files and left room for some expansion). I think I can do something similar with the thumbnail pages which are, at present, just html with standard image sizes - one for horizontal and an alternate for vertical images.
 
I have a question concerning something andas said on 19 dec 2001

I am trying to figure out how to do a save from an action which i will then run as a batch job.
But i want to add a prefix or suffix to the file name.
I have Ps5.0

on 19 dec andas said
....or use batch processing (which does allow auto addition of some text to the front of a filename) but this puts me right back in the same do loop.

so how do i do the auto addition of some text ?
i realize i can "save" to a different directory and then rename outside PS, but I would rather to it all in one action

thanks
 
Write your action without any open, close or save functions. Put all your images for processing in the same folder, put only the images in this folder. When you choose the batch function you can edit the 'scheme' for which it saves the processed file. You can save it over the original or you can have PS increment the names into a new folder. I perfer the latter. BEHOLD! As Steve Jobs introduces us the latest in desk-lamp technology!
 
yes but ...
telling PS to save into a new folder using the &quot;FOLDER&quot; option in the batch dialog still seems to saves the file to the same name. Okay its in a different folder, but i want it to have a different name, something like <orignal_name>_thumb.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top