How To Convert Png To Jpg On Linux

View previous topic View next topic Go down

How To Convert Png To Jpg On Linux

Post by jamied_uk on 26th July 2016, 23:32

Code:
convert jnet.png image.jpg


avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: How To Convert Png To Jpg On Linux

Post by jamied_uk on 26th July 2016, 23:35

Loop


Code:
for i in *.png ; do convert "$i" "${i%.*}.jpg" ; done
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: How To Convert Png To Jpg On Linux

Post by jamied_uk on 26th July 2016, 23:35

Or

Code:
for img in *.png; do
    filename=${img%.*}
    convert "$filename.png" "$filename.jpg"
done
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: How To Convert Png To Jpg On Linux

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum