2 Replies Latest reply on Feb 17, 2010 2:48 AM by psm3d

    How to find opaque pixels in a selection

    psm3d

      Hi all,

       

      I want to find any opague (even 0.1% opacity) pixel in a selection.

      can anyone help me?

        • 1. Re: How to find opaque pixels in a selection
          Michael L Hale Level 5

          With your selection active call the function below.

           

          function interscetTransparency() {
              var desc = new ActionDescriptor();
                  var channelRef = new ActionReference();
                  channelRef.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') );
              desc.putReference( charIDToTypeID('null'), channelRef );
                  var selectionRef = new ActionReference();
                  selectionRef.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
              desc.putReference( charIDToTypeID('With'), selectionRef );
              executeAction( charIDToTypeID('Intr'), desc, DialogModes.NO );
          };
          
          • 2. Re: How to find opaque pixels in a selection
            psm3d Level 1

            Thank you mike

             

            it is working