1

I have purchased a mirrorless Samsung NX300 which is a nice entry-leve mirrorless camera. However Samsung produces a stupid proprietary RAW format instead of the standard RAW format (do other vendors do this?). And instead of RAW files I get .SRW files. Ubuntu recognizes them as TIFF but nautilus does not show thumbnails and image viewer does not show them. I can open them using Rawtherapee or Darktable and that is more than fine.

However, I was wandering if there is a quick and dirty way to mass convert all SRW files to TIFF files (or any other lossless standard).

xpanta
  • 1,491

1 Answers1

2

As far as I know, each manufacturer has its own RAW format. You can change the format easily with the software ufraw-batch. You need the latest version of ufraw to process .srw files, to add it to your repositories do the following:

sudo add-apt-repository ppa:crass/ufraw
sudo apt-get update
sudo apt-get install ufraw-batch

Now you need to make a script to convert the files. Example: Save the following as scriptname.sh For simplicity, save it in the same directory as your images.

#!/bin/bash

for f in "*.srw";
do
        echo "Processing $f"
        ufraw-batch \
                --wb=camera \
                --exposure=auto \
                --out-type=tiff \
                --out-path=. \
            $f
done

Then open the terminal and navigate to the directory where your files are located(ex: cd /home/user/pictures/) and execute the script as follows:

sh scriptname.sh

The script should convert every SRW image to tiff and keep it in the same directory. To stop the script(as it takes a long time to process many images) press ctrl+c while on the terminal.

If you want to move all the .tif images to a new folder to tidy up the images, you can do:

mv *.tif folder_to_save_all_the_tiffs/
Erdorath
  • 429
  • 2
  • 6
  • Thanks a lot. I created the script and tried to run it inside the pics folder (where my SRW pics are) and I get this error: srw_convert.sh: 6: srw_convert.sh: Syntax error: "done" unexpected (expecting "do"). Any ideas? – xpanta Sep 22 '14 at 05:02
  • Check the new version, I wrote the other one under windows and it introduced wrong character lines, also you need the latest version of ufraw in order to process srw files. I tested this one on my computer and it works well. – Erdorath Sep 22 '14 at 07:28
  • I sometimes get the error ufraw-batch: No input file, nothing to do. script.sh: line 12: DSC05241.ARW: command not found which doesn't make sense, because (as the next line says) there's definitely a .ARW file in there (and I adjusted the script for that). Also, when it worked, it messed up the colours quite badly (everything had a blue-ish tint) and there was some pretty drastic vignetting. Is there some way to make the ufraw-batch command just output 'normal' values for everything, so that the .tiff or .jpg looks like the raw file? – GuyfromAmsterdam Jan 16 '15 at 11:58
  • According to the error message, it seems like you are trying to convert a .ARW file, I'm not sure that format is supported by UFRAW... have you been succesfull to convert any .ARW files? About the colors, you can add lines to adjust the output as you choose, specifically, the line --wb=camera \ controls the white balance, maybe instead of camera you should set to --wb=auto \. Type man ufraw-batch in the console to see all available commands. – Erdorath Jan 17 '15 at 13:29