Skip to content

Instantly share code, notes, and snippets.

@belenaj
Last active July 16, 2025 12:22
Show Gist options
  • Save belenaj/50c0b94639c030b85725b872328ed658 to your computer and use it in GitHub Desktop.
Save belenaj/50c0b94639c030b85725b872328ed658 to your computer and use it in GitHub Desktop.
Convert RAW photos to JPG in the Mac OS terminal

Convert RAW photos to JPG in the Mac OS terminal

Source: https://coderwall.com/p/nhp7mq/convert-raw-photos-to-jpg-in-the-mac-os-terminal

No need for slow and heavy Photoshop scripts for this one, you can do easily do this right from your terminal window.

This is possible using "sips", an image editing tool already available on Mac which allows you to do all sorts of image manipulation, including resizing and converting.

So we first grab all RAW files in a folder, We convert them to jpeg (or any other format), And we output them somewhere else.

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

You could also specify a different folder (but it has to exist in advance)
for i in *.CR2; do sips -s format jpeg $i --out "/tmp/my_images/${i%.*}.jpg"; done

I am currently checking the quality of the output jpeg files

EDIT: The picture quality that I get is way better than the one obtained with LibRaw and rawpy or rawkit, being rawpy the worst.

@ErickWendel
Copy link

thanks a lot! it's really helpful. (I tried using .ARW files and worked well

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