• Batch Image Conversion with sips (MacOs X)
    http://osxdaily.com/2013/01/11/converting-image-file-formats-with-the-command-line-sips

    Converting a group of images is a little trickier, and using simple wildcards like when resizing with sips doesn’t work quite the same. You’ll find that using a generic wildcard like * doesn’t rename the file as well, so we’ll use very simple shell scripting instead with the following command syntax:

    for i in [filename]; do sips -s format [image type] $i --out [destination]/$i.[extension];done

    Putting that to use, we’ll convert a folder of .jpeg files to png files in a new subfolder of the current directory, called “Converted”:

    for i in *.jpeg; do sips -s format png $i --out Converted/$i.png;done

    #sips

    • conseil d’ami : utilise plutôt "$i" ; si tu as des images avec des espaces ça t’évitera des suprises

  • Redimensionner tout un dossier d’images en ligne de commande dans le terminal de MacOS :

    sips -Z 2400 *.jpg

    (2400 étant la dimension maximale souhaitée).

    Et il semble qu’on peut également forcer le profil colorimétrique (ici sRGB) :

    sips -Z 2400 -m "/System/Library/Colorsync/Profiles/sRGB Profile.icc" *.jpg

    et en forçant la qualité de la compression JPEG :

    sips -Z 2400 -s formatOptions 80% -m "/System/Library/Colorsync/Profiles/sRGB Profile.icc" *.jpg

    #sips