#/bin/bash# -----------------------------------------------------------------------------# FILE PURPOSE AND NOTES:# Convert webp files to png in current directory## -----------------------------------------------------------------------------echo"Convert Webp to Png"echoecho"Note this only works on webp files in the current directory:"echo"Right now, that is $(pwd)"echoread -p "Press any key to continue"echofor i in *.webp; doecho".. Converting $i"
ffmpeg -hide_banner -loglevel error -i "$i""${i%%.*}.png"doneechoecho"Here are the original webp and new png files now:"echols *.webp *.png
echoecho"Ok to delete the webp files now? (Y/n)"read -p ": " ANSWER
echocase$ANSWERin
n|N)
echo"Leaving webp files."
;;
*)
echo"Removing webp files.."rm -v *.webp
;;
esacecho
Here’s my solution to WebP:
#/bin/bash # ----------------------------------------------------------------------------- # FILE PURPOSE AND NOTES: # Convert webp files to png in current directory # # ----------------------------------------------------------------------------- echo "Convert Webp to Png" echo echo "Note this only works on webp files in the current directory:" echo "Right now, that is $(pwd)" echo read -p "Press any key to continue" echo for i in *.webp; do echo ".. Converting $i" ffmpeg -hide_banner -loglevel error -i "$i" "${i%%.*}.png" done echo echo "Here are the original webp and new png files now:" echo ls *.webp *.png echo echo "Ok to delete the webp files now? (Y/n)" read -p ": " ANSWER echo case $ANSWER in n|N) echo "Leaving webp files." ;; *) echo "Removing webp files.." rm -v *.webp ;; esac echo
What’s the purpose of converting webp files to png? Isn’t it potentially making the filesize bigger? Is it for compatibility for legacy apps?
Personally I don’t care what format my pics are in (I don’t use that many). But I get great satisfaction converting them out of Google’s fav.