简体   繁体   中英

So I have a folder which contains around 300 png files and I want to convert all of them to jpg files

i have a access to a Ubuntu server and a macOS installation

I've searched only but haven't found anything

install imagemagick and rename

sudo apt install imagemagick rename

go in the folder to be safe

cd /dir/with/pngs

convert them all in a for/do/done loop
for png in $(ls -1 *.png); do
   convert "$png" "${png/png/jpg}"
done

You win one million fire emojiis.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM