Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions share/shutter/resources/system/plugins/perl/spwatermark/spwatermark
Original file line number Diff line number Diff line change
Expand Up @@ -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
#--------------------------------------
Expand Down Expand Up @@ -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 {
Expand Down