Skip to content

Instantly share code, notes, and snippets.

@mayurah
Created August 9, 2017 20:42
Show Gist options
  • 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.

@app4g
Copy link

app4g commented Sep 17, 2024

awesome

@mrgraff-dev
Copy link

Glad I found this today, took hundreds of raw photos of the eclipse. Thanks so much!

@Jelvani
Copy link

Jelvani commented May 26, 2025

To parallelize (assuming brew install parallel has been done):

parallel 'sips -s format jpeg "{}" --out Converted/{/.}.jpg' ::: *.CR2

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