I want a Photoshop droplet that can resize several images to the same target size.
Of course I can put landscape and portrait images into separate folders and apply a different action on each, but that is so lame.
So I made a script like this:
if (app.activeDocument.width.value > app.activeDocument.height.value) {
app.activeDocument.resizeImage("920 px", undefined, undefined,
ResampleMethod.BICUBIC);
} else {
app.activeDocument.resizeImage("455 px", undefined, undefined,
ResampleMethod.BICUBIC);
}
Which works fine. But the problem is that I need a different script for each different resolution. This could also be solved using the Save for Web command, but I believe that behaves the same way as resizing.
I can ask the user to specify a width inside the script (using a dialog box) but I imagine if I do this inside a droplet, and I drop several files over the droplet, it will show the dialog box for every file. I want to show it only once.
So my question is: is there a better way to create a universal resizing droplet that can ask the desired width/height once for every batch? Or is the only way to create several scripts and droplets, one for each resolution?