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

How to enable scale styles

Contributor ,
Jun 14, 2013 Jun 14, 2013

Copy link to clipboard

Copied

Hi,

  Im new to photoshop scripting.  I need to enable scale styles checkbox when I resizing the image.  I don't know how to do in javascript.

If anyone knows pls help me.

Thanks in advance,

Sudha K

TOPICS
Actions and scripting

Views

979

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
Valorous Hero ,
Jun 14, 2013 Jun 14, 2013

Copy link to clipboard

Copied

You would use the scriptlistener output to get the code, as an example...

resizeDoc(1000);

function resizeDoc(W) {

var desc = new ActionDescriptor();

desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Pxl'), W );

desc.putBoolean( stringIDToTypeID('scaleStyles'), true );

desc.putBoolean( charIDToTypeID('CnsP'), true );

desc.putEnumerated( charIDToTypeID('Intr'), charIDToTypeID('Intp'), stringIDToTypeID('bicubic') );

executeAction( charIDToTypeID('ImgS'), desc, DialogModes.NO );

};

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
Contributor ,
Jun 17, 2013 Jun 17, 2013

Copy link to clipboard

Copied

LATEST

Hi,

  Thanks for ur timely help.  

  When I use this code, document getting resized for specified width value(1000) but scalestyles check is not enabled in Image size pallete.   How can I check whether scalestyles checkbox is enabled or not??

Below resize code is working for ebnabling resample Image and  constrain propotional except ScaleStyles check box.

activeDocument.resizeImage(new UnitValue(Ht, 'pixels'),undefined,300,ResampleMethod.BICUBICSHARPER )

Thanks in advance,

Sudha K

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