i have a folder of images..
i want to resize them to 1000px width..
i want to record an action to do this, but i want to resize images only the ones width are lower than 1000px, i want the action ignore the images those width are higher than 1000px..
is it possible to record an action this way?
Hi
@evren
A couple ways is to have a script test for width and then have the scriipt (or call to an Action) to resize to 1000px if the image was less that 1000 px. That would be the most direct way.
An indirect way that I believe will work yet I have not created the Action to fully check it out is a process that uses Conditional tests to chose what path to take i.e. to leave the image alone if it is larger that 1000 and then to resize to 1000 pixels if not.
The only issue you cannot test for width directly in an Action so here is an indirect way I believe will work
I am assuming the image is a single Layer in Photoshop, though you did not specify this.
1) Duplicate the Layer
2) Make the duplicate Layer the only visible Layer. Option/ Alt Click on the eye icon.
3) Adjust the Canvas size with relative turned off and the center point selected to be 1000 pixels wide, and for height, use the maximum reasonable height you would expect in your files, and accept the new canvas size.
4) Choose the delete button to delete all the pixels within this 100o pixel width
5) Use Image > Reveal All
6) Cmd Click on the duplicate Layer thumbnail in the Layer panel
Note, at this point, if the image is larger than 1000 px, it will create a selection around the parts of the image outside the 1000 W boundary.
If the image is equal to or less than 1000 pixel width, there will be no selection
7) So now you use the conditional test in Actions and test for a selection
- If there is a selection, then you close this image file, which, in a batch mode, would bring up the next file because this image was larger than 1000 px in width
- If there is no selection, you delete this duplicate Layer and then Cmd Click on this original Layer thumbnail, which puts a selection around the original pixels, and crop to this size (this eliminates the transparent pixels that were previously created with the canvas command. From here, you resize to 1000 pixels wide
As I said, I did not try this out to make sure it is a robust solution yet it seems that this process should work.
Just a quick suggestion
John Wheeler