# apply Photoshop unsharp masking filterThis almost works, but puts wacky values in the AppleEvent (when viewed with CaptureAE).
# usage: applyPSusm($dobj, $radius, $amount, $threshold);
sub applyPSusm {
# get the parameters
my ($dobj, $radius, $amount, $threshold) = @_;
# build the parameter string
my $param = "'----':$dobj, " .
"'^Typ':type(fUnM), prdt:{Rds :doub(@\), Amnt:long(\@), Thsh:long(\@)}";
# send the Apple Event
do_event(qw/Indy kFlt 8BIM/, $param, $radius, $amount, $threshold);
}
Process("Adobe® Photoshop® 5.5").SendAE "Indy,kFlt,'----':obj {want:type(docu), from:'null'(), form:ID , seld:1045}, '^Typ':type(fUnM), prdt:{Rds :0, Amnt:3, Thsh:46922336}} 4"The following works fine when the parameters are integer values:
# apply Photoshop unsharp masking filterHowever, I need $radius to be floating point, which causes the above routine to fail.
# usage: applyPSusm($dobj, $radius, $amount, $threshold);
sub applyPSusm {
# get the parameters
my ($dobj, $radius, $amount, $threshold) = @_;
# build the parameter string
my $param = "'----':$dobj, " .
"'^Typ':type(fUnM), prdt:{Rds :$radius, Amnt:$amount, Thsh:$threshold}";
# send the Apple Event
do_event(qw/Indy kFlt 8BIM/, $param);
}