1 Reply Latest reply on Apr 15, 2010 7:36 AM by Michael L Hale

    How to change the resolution of the image?

    Maria prabhudoss Level 1

      How to change the resolution of the image and how to set the "pixel/inch" in the Document Size. Also how to enable the check box of "Scale Styles", "Constrain Proportion" and "Resample Image" via scripting. Kindly advise me.

       

      Thanks

        • 1. Re: How to change the resolution of the image?
          Michael L Hale Level 5

          resizeImage does not let you set 'Scale Styles'. If you want to scale the styles you need to use scriptlistner.

           

          Here are examples for "Constrain Proportion" and "Resample Image".

           

          activeDocument.resizeImage( undefined,undefined,300,ResampleMethod.NONE);// change the dpi without resample
          activeDocument.resizeImage( new UnitValue(2,'in'),undefined,72,ResampleMethod.BICUBICSHARPER);// change width - defaults to constrain proportion
          activeDocument.resizeImage( new UnitValue(5,'in'),new UnitValue(5,'in'),300,ResampleMethod.BICUBICSHARPER);// change both w and h - may or may not matain proportions