user
How to convert a batch of .arw image to jpg on Ubuntu?
alphonsio

You can convert a batch of .arw (Sony RAW) images to .jpg on Ubuntu using ImageMagick, dcraw, or RawTherapee. Here are a few methods:


Method 1: Using dcraw and imagemagick (Recommended for CLI)

  1. Install the required packages:
sudo apt update
sudo apt install dcraw imagemagick
  1. Convert all .arw files in a directory to .jpg:
for file in *.arw; do 
    dcraw -c "$file" | convert - "${file%.arw}.jpg"
done
  • dcraw -c "$file": Converts the RAW file to a standard format.
  • convert - "${file%.arw}.jpg": Converts it to JPG.

Method 2: Using rawtherapee-cli (For better color processing)

  1. Install RawTherapee:
sudo apt install rawtherapee
  1. Create output directory:
mkdir output
  1. Convert all .arw files:
rawtherapee-cli -o ./output/ -j95 -c *.arw
  • -o ./output/ → Output directory.
  • -j95 → Set JPEG quality to 95%.
  • -c → Process all files.

Method 3: Using darktable-cli (For better control)

  1. Install darktable:
sudo apt install darktable
  1. Create output directory:
mkdir output
  1. Convert images:
for file in *.arw; do 
    darktable-cli "$file" "output/${file%.arw}.jpg"
done

Method 4: Using ufraw (Older tool)

  1. Install ufraw:
sudo apt install ufraw
  1. Convert files:
for file in *.arw; do 
    ufraw-batch --out-type=jpeg --output="${file%.arw}.jpg" "$file"
done

Which method should you choose?

  • For quick conversion: Use dcraw + ImageMagick.
  • For better color & quality: Use RawTherapee or Darktable.
  • For lightweight processing: Use ufraw.