Skip to main content
Adobe Photoshop Family

2 Messages

 • 

90 Points

Tue, Mar 20, 2018 5:11 PM

2

Photoshop: Provide AppleScript access to the "Preserve Details 2.0" resampling method

Please give us the ability to access the new "Preserve Details 2.0" resampling method via AppleScript. 

This method was introduced in CC 2018 and is popular with users - but cannot be automated without the access by script. (And yes, I do realize it's still a part of Technology Preview options).

Thanks,
Leo

Responses

2 Messages

 • 

72 Points

3 years ago

This would be great to be able to do this with automation and applescript, etc.

Adobe Administrator

 • 

15.8K Messages

 • 

295.1K Points

3 years ago

You can call a JS from Apple Script to enable it if it's off:

// =======================================================
var idsetd = charIDToTypeID( "setd" );
    var desc45 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref9 = new ActionReference();
        var idPrpr = charIDToTypeID( "Prpr" );
        var idexperimentalFeatures = stringIDToTypeID( "experimentalFeatures" );
        ref9.putProperty( idPrpr, idexperimentalFeatures );
        var idcapp = charIDToTypeID( "capp" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref9.putEnumerated( idcapp, idOrdn, idTrgt );
    desc45.putReference( idnull, ref9 );
    var idT = charIDToTypeID( "T   " );
        var desc46 = new ActionDescriptor();
        var idenhancedControlsTouchBarPropertyFeedback = stringIDToTypeID( "enhancedControlsTouchBarPropertyFeedback" );
        desc46.putBoolean( idenhancedControlsTouchBarPropertyFeedback, false );
        var idexpFeatureDeepUpscale = stringIDToTypeID( "expFeatureDeepUpscale" );
        desc46.putBoolean( idexpFeatureDeepUpscale, true );
    var idexperimentalFeatures = stringIDToTypeID( "experimentalFeatures" );
    desc45.putObject( idT, idexperimentalFeatures, desc46 );
executeAction( idsetd, desc45, DialogModes.NO );

Sr. Product Manager, Adobe Digital Imaging

2 Messages

 • 

72 Points

3 years ago

Thank, Jeffrey. Love your book!

2 Messages

 • 

90 Points

3 years ago

Hi Jeffrey,

Thank you for your reply!

Could you please clarify: as far as I understand, your script only activates the "Enable Preserve Details 2.0 Upscale" option in the preferences. Or am I wrong?

What I need is the ability to use the Preserve Details 2.0 resample method when using the resize image command in AppleScript. 

Right now the Photoshop AS dictionary doesn't list this method:
[resample method automatic/‌bicubic/‌bicubic automatic/‌bicubic sharper/‌bicubic smoother/‌bilinear/‌closest neighbor/‌none/‌preserve details] : what method should be used for resampling pixels ( default: bicubic )
Thanks again - your help is greatly appreciated.

Leo