2 Replies Latest reply on Mar 8, 2013 1:23 AM by bala281972

    Levels | script

    bala281972

      Hi

       

      Though there are various ways to adjust an image in PS, one such way is to use Levels. The attached screen capture shows there's no details in Shadow and Highlight. This means the values to be corrected for this particular channel. Can this be automated? What we do manually is to adjust the input values so that the tiny bar sits directly below the starting of the levels. Can we automate this particular task?

       

      The script should find out whether the curve starts from 0th point or from somewhere else, if it starts from somewhere else then the input value should be moved to that starting point of the curve. Similarly, the output value should end where the curvature ends and not necessarily its at 255th position. Attached the necessary screen captures & original files. Any thought on this ?before.pngafter.pngCapitol.JPG

        • 1. Re: Levels | script
          JJMack Most Valuable Participant

          DOM

          adjustLevels ( inputRangeStart , inputRangeEnd , inputRangeGamma , outputRangeStart , outputRangeEnd ); Adjusts the levels of the selected channels

          where           number [0..253] number [(start + 2)..255] number [0.10..9.99] number [0..253] number [(start + 2)..255]

           

          autoLevels(); Adjusts the levels of the selected channels using the auto levels option.

           

          ActionManager

          Photoshop has an Levels Options... preset for that for all color channels so install the scriptlistener plug-in and record Levels>Options>Enhance Per Chanel Contrast and grabe the script code recorded by the plug-in.

          LevelPerColor.jpg

          • 2. Re: Levels | script
            bala281972 Level 1

            Thanks JJ, the auto levels solves the problem. I couldnt use 'enhance per channel contrast' as the contrast of the overall image shoots up and it gives a different result.

             

            Thanks for pointing out