AVIF image support for Colorizer
This commit is contained in:
parent
115fa05497
commit
fd759a4cc6
@ -41,10 +41,16 @@ n=${#HOME}
|
||||
((n++))
|
||||
NAME=${NAME:${n}}
|
||||
fi
|
||||
ext="${WALLPATH##*.}"
|
||||
#notify-send.sh "Extension" "$ext"
|
||||
|
||||
if [ ! -f "$WALLPALDIR/${NAME}.clr" ]; then
|
||||
if [ "$ext" == "avif" ];then
|
||||
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,3) substr($3,6,2) substr($3,10,2)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
|
||||
else
|
||||
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
|
||||
fi
|
||||
fi
|
||||
|
||||
# GENERATE THUMBNAIL
|
||||
THUMBDIR="$HOME/.cache/colorizer/thumbs"
|
||||
@ -60,10 +66,10 @@ convert ${WALLPATH} -resize 52x52^ -gravity center -extent 52x52 -bordercolor wh
|
||||
killall -SIGUSR1 tint2
|
||||
|
||||
# auto generate themes
|
||||
if command -v w2theme &> /dev/null
|
||||
then
|
||||
source ~/.config/colorizer/colorizer.conf
|
||||
if [[ "$wall2themes" == "yes" ]];then
|
||||
w2theme colorize
|
||||
fi
|
||||
fi
|
||||
#if command -v w2theme &> /dev/null
|
||||
#then
|
||||
#source ~/.config/colorizer/colorizer.conf
|
||||
# if [[ "$wall2themes" == "yes" ]];then
|
||||
# w2theme colorize
|
||||
# fi
|
||||
#fi
|
||||
|
Loading…
Reference in New Issue
Block a user