Skip to content

Instantly share code, notes, and snippets.

@mayurah
Created August 9, 2017 20:42
Show Gist options
  • Star 26 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mayurah/03ed7270e296be0804a73792bf82386a to your computer and use it in GitHub Desktop.
Save mayurah/03ed7270e296be0804a73792bf82386a to your computer and use it in GitHub Desktop.
Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
# Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
mkdir Converted
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;done
@vishal-biyani
Copy link

Thanks, this is super useful!

@eriktailor
Copy link

Cool, thanks! 👍

@aryan-ev3
Copy link

Thank you very much for sharing very useful!

@sikrew
Copy link

sikrew commented Dec 18, 2023

this is awesome. Thank you.

@sourg
Copy link

sourg commented Mar 24, 2024

Very useful, thanks! 👍

One could extend the command above to

for i in *.CR2; do sips -s format jpeg $i --out Converted/${i%.*}.jpg;done

so that the converted file of example.CR2 will now be named example.jpg instead of example.CR2.jpg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment