From 6646e15183f35219a476f839c198fdf0740f02c3 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Mon, 19 Sep 2022 17:00:44 -0700 Subject: [PATCH] Changed to use jpg --- bin/capture-area.sh | 8 +++++--- bin/capture-window.sh | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/capture-area.sh b/bin/capture-area.sh index c4e9ea8..d00d4a1 100755 --- a/bin/capture-area.sh +++ b/bin/capture-area.sh @@ -1,4 +1,6 @@ #!/bin/bash +# +# Apparently using png screws up sometimes so let's try using good old jpg timeout=10 screenshot_directory=/tmp @@ -8,11 +10,11 @@ function yesno { zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null } -mate-screenshot -ac +mate-screenshot --area --clipboard aplay ~/Conf/CameraClick.wav -file="$screenshot_directory/$(date +%F@%T).png" +file="$screenshot_directory/$(date +%F@%T).jpg" if yesno "Save screenshot as $file?"; then - xclip -selection clipboard -t image/png -o > $file + xclip -selection clipboard -t image/jpeg -o > $file fi diff --git a/bin/capture-window.sh b/bin/capture-window.sh index 4a859c2..21270cf 100755 --- a/bin/capture-window.sh +++ b/bin/capture-window.sh @@ -1,4 +1,6 @@ #!/bin/bash +# +# Apparently using png screws up sometimes so let's try using good old jpg timeout=10 screenshot_directory=/tmp @@ -8,11 +10,13 @@ function yesno { zenity --question --text "$question" --width=300 --timeout=$timeout 2> /dev/null } -mate-screenshot -wc +sleep 1 + +gnome-screenshot --window --clipboard aplay ~/Conf/CameraClick.wav -file="$screenshot_directory/$(date +%F@%T).png" +file="$screenshot_directory/$(date +%F@%T).jpg" if yesno "Save screenshot as $file?"; then - xclip -selection clipboard -t image/png -o > $file + xclip -selection clipboard -t image/jpeg -o > $file fi -- 2.17.1