2 Replies Latest reply on Jul 26, 2015 11:24 AM by pb4891

    how to perform changes in Reduce Noise ?

    pb4891 Level 1

      how to perform changes in Reduce Noise  using script (function) ?

        • 1. Re: how to perform changes in Reduce Noise ?
          Chuck Uebele Adobe Community Professional & MVP

          Use scriptlistener to record the filter:

           

          var iddenoise = stringIDToTypeID( "denoise" );
              var desc4 = new ActionDescriptor();
              var idClNs = charIDToTypeID( "ClNs" );
              var idPrc = charIDToTypeID( "#Prc" );
              desc4.putUnitDouble( idClNs, idPrc, 45.000000 );
              var idShrp = charIDToTypeID( "Shrp" );
              var idPrc = charIDToTypeID( "#Prc" );
              desc4.putUnitDouble( idShrp, idPrc, 25.000000 );
              var idremoveJPEGArtifact = stringIDToTypeID( "removeJPEGArtifact" );
              desc4.putBoolean( idremoveJPEGArtifact, false );
              var idchannelDenoise = stringIDToTypeID( "channelDenoise" );
                  var list1 = new ActionList();
                      var desc5 = new ActionDescriptor();
                      var idChnl = charIDToTypeID( "Chnl" );
                          var ref1 = new ActionReference();
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idCmps = charIDToTypeID( "Cmps" );
                          ref1.putEnumerated( idChnl, idChnl, idCmps );
                      desc5.putReference( idChnl, ref1 );
                      var idAmnt = charIDToTypeID( "Amnt" );
                      desc5.putInteger( idAmnt, 6 );
                      var idEdgF = charIDToTypeID( "EdgF" );
                      desc5.putInteger( idEdgF, 60 );
                  var idchannelDenoiseParams = stringIDToTypeID( "channelDenoiseParams" );
                  list1.putObject( idchannelDenoiseParams, desc5 );
                      var desc6 = new ActionDescriptor();
                      var idChnl = charIDToTypeID( "Chnl" );
                          var ref2 = new ActionReference();
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idRd = charIDToTypeID( "Rd  " );
                          ref2.putEnumerated( idChnl, idChnl, idRd );
                      desc6.putReference( idChnl, ref2 );
                      var idAmnt = charIDToTypeID( "Amnt" );
                      desc6.putInteger( idAmnt, 0 );
                  var idchannelDenoiseParams = stringIDToTypeID( "channelDenoiseParams" );
                  list1.putObject( idchannelDenoiseParams, desc6 );
                      var desc7 = new ActionDescriptor();
                      var idChnl = charIDToTypeID( "Chnl" );
                          var ref3 = new ActionReference();
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idGrn = charIDToTypeID( "Grn " );
                          ref3.putEnumerated( idChnl, idChnl, idGrn );
                      desc7.putReference( idChnl, ref3 );
                      var idAmnt = charIDToTypeID( "Amnt" );
                      desc7.putInteger( idAmnt, 0 );
                  var idchannelDenoiseParams = stringIDToTypeID( "channelDenoiseParams" );
                  list1.putObject( idchannelDenoiseParams, desc7 );
                      var desc8 = new ActionDescriptor();
                      var idChnl = charIDToTypeID( "Chnl" );
                          var ref4 = new ActionReference();
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idChnl = charIDToTypeID( "Chnl" );
                          var idBl = charIDToTypeID( "Bl  " );
                          ref4.putEnumerated( idChnl, idChnl, idBl );
                      desc8.putReference( idChnl, ref4 );
                      var idAmnt = charIDToTypeID( "Amnt" );
                      desc8.putInteger( idAmnt, 0 );
                  var idchannelDenoiseParams = stringIDToTypeID( "channelDenoiseParams" );
                  list1.putObject( idchannelDenoiseParams, desc8 );
              desc4.putList( idchannelDenoise, list1 );
              var idpreset = stringIDToTypeID( "preset" );
              desc4.putString( idpreset, """Default""" );
          executeAction( iddenoise, desc4, DialogModes.NO );