cantor-mx-tastatura/images/layers/add_border.sh
2024-09-04 20:52:29 +02:00

20 lines
408 B
Bash
Executable file

#!/bin/bash
# GIMP commands for the screenshot preparation:
# - Layer > Crop to Content [Alt + L, O, O, Enter]
# - Image > Fit Canvas to Layers [Alt + I, A]
filename="$1"
bordercolor="#424242"
bordersize=16
if [ ! -f "$filename" ]; then
echo "Error: File not found: $filename"
exit 1
fi
magick \
"$filename" \
-bordercolor "$bordercolor" \
-border "${bordersize}x${bordersize}" \
"$filename"