Convert and compress PNG files to JPG in bulk

To compress PNG files to JPG, you can follow steps below:
I. Convert all PNG files to JPG:
Create a script using your favorite Linux text editor and type in the following lines:
for i in $(ls *.png); do
convert $i $i.jpg
done

II. Convert the JPG quality to 50% compression
To compress the JPG files further by 50%, create a script using your favorite Linux text editor:
for i in $(ls *.jpg); do
convert -compress jpeg -quality 50 $i $i.cjpg
done

That’s it.

Leave a Reply

  

  

  

Blue Captcha Image
Refresh

*

October 2019
M T W T F S S
« Sep    
 123456
78910111213
14151617181920
21222324252627
28293031