Skip to main content
Participant
November 8, 2014
Answered

Is there any way to apply a box blur filter?

  • November 8, 2014
  • 1 reply
  • 368 views

There seems to be methods to perform almost all filters, like applyGaussianBlur, applyTwirl.

But there doesn't seem to be one for box blur. Is there any other way to perform this filter?

applyReduceNoise() would be nice too. All the pixelate filters are missing as well.

This topic has been closed for replies.
Correct answer Chuck Uebele

Use ScriptListener to capture the box blur.

var idboxblur = stringIDToTypeID( "boxblur" );

    var desc2 = new ActionDescriptor();

    var idRds = charIDToTypeID( "Rds " );

    var idPxl = charIDToTypeID( "#Pxl" );

    desc2.putUnitDouble( idRds, idPxl, 10.000000 );

executeAction( idboxblur, desc2, DialogModes.NO );

1 reply

Chuck Uebele
Community Expert
Chuck UebeleCommunity ExpertCorrect answer
Community Expert
November 9, 2014

Use ScriptListener to capture the box blur.

var idboxblur = stringIDToTypeID( "boxblur" );

    var desc2 = new ActionDescriptor();

    var idRds = charIDToTypeID( "Rds " );

    var idPxl = charIDToTypeID( "#Pxl" );

    desc2.putUnitDouble( idRds, idPxl, 10.000000 );

executeAction( idboxblur, desc2, DialogModes.NO );

Participant
November 9, 2014

Thanks that definitely works. I will try out scriptlistener to try to get the rest.

edit: ScriptListener is god.