Mobile app version of vmapp.org
Login or Join
Voss6371140

: 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

@Voss6371140

Posted in: #AdobePhotoshop #BatchProcessing #PhotoEditing #PhotoshopScripting #Resize

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Voss6371140

2 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce403

You can actually take a look at the source of the Fit Image script. It's in PresetsScriptsFit 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:


BICUBIC
BICUBICSHARPER
BICUBICSMOOTHER
BILINEAR
NEARESTNEIGHBOR
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:



New Script:



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!

10% popularity Vote Up Vote Down


 

@Reiling762

There are two solution to this.

1. Write a script.

Because of this issue, i have just started reading the manuals. i am the programming guy. But Photoshop does contain many classes, and coding JavaScript in plain text editor is not easy. And, more importantly, i found method 2 is working!

2. Through native Photoshop Preferences.

i may need to write a script for more complex operations. But not today. Simply open Photoshop, go to Edit > Preferences > General > Image Interpolation and choose Bicubic Sharper. i have tested this works well with File > Automate > Fit Image... and File > Scripts > Image Processor..., which means both will use Bicubic Sharper for resampling :)

P.S. i chose to build my own Action with Fit Image because i feel more safe with this. Image Processor is a bunch of codes, which may contain bugs, or may choose resampling methods other than Bicubic Sharper, somehow, in some cases, who knows?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme