diff --git a/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark b/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark index df08a610..1d2e9d3b 100755 --- a/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark +++ b/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark @@ -43,6 +43,7 @@ use Glib qw/TRUE FALSE/; use FindBin '$Bin'; #path where plugin is located use File::Temp qw/ tempfile tempdir /; use Time::HiRes qw/usleep/; +use IPC::Run3; #load modules at custom path at runtime #-------------------------------------- @@ -351,19 +352,21 @@ sub apply_effect { my $color = $stroke_color->get_color; #execute imagemagick command - my $command1 = "convert" . - " -background '#00000000'" . - " -fill " . "'" . sprintf( "#%04x%04x%04x%04x", $color->red, $color->green, $color->blue, $stroke_color->get_alpha ) . "'" . - " -pointsize " . $psize . - " -gravity " . $gravity_combo->get_active_text . - " -rotate " . $angle_sbutton->get_value . - " label:$text " . $tmpfilename; - my $output1 = `$command1`; - - my $command2 = "composite " . $tmpfilename . - " -gravity " . $gravity_combo->get_active_text . - " " . $filename . " " . $tmpfilename2; - my $output2 = `$command2`; + run3 ["convert", + "-background", '#00000000', + "-fill", sprintf( "#%04x%04x%04x%04x", $color->red, $color->green, $color->blue, $stroke_color->get_alpha ), + "-pointsize", $psize, + "-gravity", $gravity_combo->get_active_text, + "-rotate", $angle_sbutton->get_value, + "label:$text", $tmpfilename, + ]; + + run3 ["composite", + $tmpfilename, + "-gravity", $gravity_combo->get_active_text, + $filename, + $tmpfilename2, + ]; } sub fct_update_gui {