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).
1 Answer
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-batchNow 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
doneThen 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.shThe 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/ 4