2 Replies Latest reply on Oct 16, 2015 7:46 AM by franckl21266413

    CMYK: use custom settings into a script with converttoprofile

    franckl21266413

      Hi all,

       

      I have a problem to assign custom setting into a script for the converttoprofile function.

      I need to use "Custom CMYK ..." as destination profile.

      In Photoshop, do Edit>Convert To Profile..., then set Destination Space as "Custom CMYK ...", it opens a second window where you can set some more settings like GCR, UCA , ...

      If I use SL, the result of the script is a calculated profile, which is not what I want. I need to set in the script the settings of that second window.

      Is there a way to set GCR, UCA (and other parameters) in the script ?

       

      var idconvertToProfile = stringIDToTypeID( "convertToProfile" );

          var desc9 = new ActionDescriptor();

          var idnull = charIDToTypeID( "null" );

              var ref1 = new ActionReference();

              var idDcmn = charIDToTypeID( "Dcmn" );

              var idOrdn = charIDToTypeID( "Ordn" );

              var idTrgt = charIDToTypeID( "Trgt" );

              ref1.putEnumerated( idDcmn, idOrdn, idTrgt );

          desc9.putReference( idnull, ref1 );

          var idT = charIDToTypeID( "T   " );

          desc9.putData( idT, String.fromCharCode( 0, ...., 0, 255 ) ); // <----- profile calculated with the settings from the second window

          var idInte = charIDToTypeID( "Inte" );

          var idInte = charIDToTypeID( "Inte" );

          var idClrm = charIDToTypeID( "Clrm" );

          desc9.putEnumerated( idInte, idInte, idClrm );

          var idMpBl = charIDToTypeID( "MpBl" );

          desc9.putBoolean( idMpBl, true );

          var idsdwM = charIDToTypeID( "sdwM" );

          desc9.putInteger( idsdwM, -1 );

      executeAction( idconvertToProfile, desc9, DialogModes.NO );


      Regards.