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

How to enable scale styles

Contributor ,
Jun 14, 2013 Jun 14, 2013

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
1.1K
Translate
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

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 );

};

Translate
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
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

Translate
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