In Photoshop CS or CS2: Is there a way to “Fade” a filter after it is run, such as “High Pass” and set the “Fade’s” options such as “Opacity” and “Blending Mode”? I didn’t see any reference to this in the the CS2 Applescript guide. I could always target an action, but it would be nice to have this all compiled in AS.
I wasn’t exactly looking for the high pass properties. But when looking more into this, I was essentially able to get the same effect by copying the layer twice, apply high pass, change the layer blend mode to overly, then merge down. I am left with a duplicate layer that has been sharpened above a non sharpened layer.
If the sharpening is too much for an operator, then they can adjust the opacity of the layer called “Sharpened Layer”. It seems to work very nicely.
Thanks,
Jeff
tell application "Adobe Photoshop CS"
activate
set docRef to current document
set docHeight to height of current document
set docWidth to width of current document
set currentLayer to current layer of docRef
set theLayerName to name of current layer of document 1 as string
if visible of currentLayer is equal to false then display dialog "The layer must be visible." buttons {"Cancel"} default button 1 with icon 2
if docHeight is greater than 570 or docWidth is greater than 570 then display dialog "This image appears to be very tall or very wide. Are you sure you don't want to change the image's height and width before you sharpen?"
set theLayerName to name of current layer of docRef as string
if theLayerName is not equal to "Sharpened Layer" then
tell application "System Events" to keystroke "j" using {command down}
end if
tell application "System Events" to keystroke "j" using {command down}
set currentLayer to current layer of docRef
tell docRef
set docRes to resolution as number
if docRes is less than or equal to 73 then
set radValue to 2
end if
if docRes is less than or equal to 150 and docRes is greater than 73 then
set radValue to 4
end if
if docRes is less than or equal to 300 and docRes is greater than 150 then
set radValue to 6.5
end if
if docRes is less than or equal to 500 and docRes is greater than 300 then
set radValue to 9
end if
if docRes is less than or equal to 700 and docRes is greater than 500 then
set radValue to 12
end if
if docRes is less than or equal to 900 and docRes is greater than 700 then
set radValue to 15
end if
if docRes is less than or equal to 1100 and docRes is greater than 900 then
set radValue to 18
end if
if docRes is greater than 1100 then
set radValue to 20
end if
filter current layer using high pass with options ¬
{radius:radValue}
set properties of current layer to {opacity:100, blend mode:overlay}
tell application "System Events" to keystroke "e" using {command down}
set the name of current layer of docRef to "Sharpened Layer"
end tell
end tell