skip to Main Content

I think for those who created Interop.Photoshop.dll there is a special place in hell.
Question. I’m trying to change the center of the RadialBlur effect in C#. But I have no idea what and how to transfer parameter there.
The definition of method says

void ApplyRadialBlur (int Amount, Photoshop.PsRadialBlurMethod BlurMethod, Photoshop.PsRadialBlurQuality BlurQuality, [object BlurCenter])

That is, anything can be passed to the fourth parameter. Because the object keyword is the root of all types.

In the vbs help (https://www.adobe.com/devnet/photoshop/scripting.html,
https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-vbs-ref-2020.pdf) it says

[, BlurCenter] type Number (Double) The parameter BlurCenter is the
position (unit value).

WHAT? TO ME? DO? WITH THIS? INFORMATION?

I spent several hours and so could not find a normal working description of com interface.

2

Answers


  1. double x = 0.2;
    double y = 0.2;
    object[] BlurCenter = new object[2] { x, y }; 
    
    .ApplyRadialBlur(50, PsRadialBlurMethod.psZoom, PsRadialBlurQuality.psRadialBlurBest, BlurCenter);
    
    Login or Signup to reply.
  2. I don’t know about Interop.Photoshop.dll, but in JavaScript, the position (4th paramamater) is optional. It’s just an x,y position in an array:

    activeDocument.activeLayer.applyRadialBlur(10, RadialBlurMethod.ZOOM, RadialBlurQuality.BEST, [100,100]); 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search