add background removal

This commit is contained in:
2025-07-14 13:58:00 +02:00
parent 287482b052
commit a704635f33

View File

@@ -46,7 +46,7 @@ url+="&access_token=$key"
# process incoming data # process incoming data
[ ! -d "$outdir" ] && { mkdir -p "$outdir" || error "failed to access '$outdir'!"; } [ ! -d "$outdir" ] && { mkdir -p "$outdir" || error "failed to access '$outdir'!"; }
curl "$url" -o "$outdir/tmp.png" || error "failed to download from url='$url'!" curl "$url" -o "$outdir/tmp.png" || error "failed to download from url='$url'!"
mv -f "$outdir/tmp.png" "$outdir/curr.png" convert "$outdir/tmp.png" -alpha set -channel RGBA -fuzz 1% -fill none -floodfill +0+0 white "$outdir/curr.png"
# update the feh background # update the feh background
. "$HOME/.fehbg" . "$HOME/.fehbg"