• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change last resample method type

Engaged ,
Mar 07, 2022 Mar 07, 2022

Copy link to clipboard

Copied

I can change the prefernces for resampling type

    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
    var desc1121 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref179 = new ActionReference();
    var idPrpr = charIDToTypeID( "Prpr" );
    var idGnrP = charIDToTypeID( "GnrP" );
    ref179.putProperty( idPrpr, idGnrP );
    var idcapp = charIDToTypeID( "capp" );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idTrgt = charIDToTypeID( "Trgt" );
    ref179.putEnumerated( idcapp, idOrdn, idTrgt );
    desc1121.putReference( idnull, ref179 );
    var idT = charIDToTypeID( "T   " );
    var desc1122 = new ActionDescriptor();
    var idIntM = charIDToTypeID( "IntM" );
    var idIntp = charIDToTypeID( "Intp" );
    var idNrst = charIDToTypeID( "Nrst" );
    desc1122.putEnumerated( idIntM, idIntp, idNrst );
    var iduseClassicFileNewDialog = stringIDToTypeID( "useClassicFileNewDialog" );
    desc1122.putBoolean( iduseClassicFileNewDialog, true );
    var idGnrP = charIDToTypeID( "GnrP" );
    desc1121.putObject( idT, idGnrP, desc1122 );
    executeAction( idsetd, desc1121, DialogModes.NO );

But that doesn't change the last used type of resample for Image Resize and or Transforms - which is what I'm trying to do.

 

Essentially

var currentResizemethod = ???

var newResizemethod = ResampleMethod.NEARESTNEIGHBOR;

 

Trying to force an image to resize doesn't seem to change that last human selection ofr the sample method.

 

 

 

TOPICS
Actions and scripting

Views

158

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Mar 07, 2022 Mar 07, 2022

Copy link to clipboard

Copied

Some operations have their own settings, which are remembered according to the last action performed by the user. The easiest way is to perform the desired operation once with the specified parameters (it's better not to do this on a working file, but to create a temporary one). Photoshop will later offer the specified parameters automatically.

 

Perhaps there is a way to manipulate similar parameters in a different way, but I do not know it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 07, 2022 Mar 07, 2022

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines