Home » Tech » Linux » CLI image conversion JPG to PNG
          

CLI image conversion JPG to PNG

Using ImageMagick (on Linux) to convert all jpgs in a folder to png, with alpha layer, with longest side 400 pixels:

for f in *.jpg; do convert -verbose -resize "400x400>" -alpha on "$f" "${f/%jpg/png}"; done