Photoshop: Batch Fit Image x Bicublic Sharper?


1) By File -> Automate -> Fit Image...,

we can fit images of any size or orientation into a particular frame size. But we cannot specify the resample method, like Bicublic Sharper. In fact we do not know what resample method it uses.

2) By Image -> Image Size...,

we can control the resample methods. But for batch processing, like batch resize photos of different orientation, we cannot specify a "fit-frame" size in this menu.

Is there a way/a script/a menu that we can combine the advantages of the two - Batch Fit Image with Bicublic Sharper?

5/27/2013 6:53:00 PM

You can actually take a look at the source of the Fit Image script. It's in \Presets\Scripts\Fit Image.jsx (at least for CS5).

In my script, the resampling method is on line 135:

app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC);

So there you go, the default method is Bicubic.

According to the reference guide, we can send one of the following:

  • NONE

Same as the image size dialog in PS (big surprise!), with an additional NONE.

"Band-aid" Script

I am far from an expert at scripting in Photoshop, but I was able to modify the existing Fit Image script to incorporate a re-sampling method dropdown. This works for me in CS5, I did not test it in any other version of Photoshop.

Old Script:

Old 'n' Busted

New Script:

New Hotness

Get it here

Edit: Okay, so this isn't (yet) compatible with a recorded action, which admittedly makes it kinda worthless. I'll have to figure out how that works. Now with recorded action functionality!

9/27/2016 7:41:00 PM