[Ubuntu] Converting CR2 to JPG
I’ve received about 300 images in CR2 (Canon raw image format) and wanted to convert it to jpg.
Here is a solution working on Ubuntu 12.04 LTS:
- Install libjpeg-turbo-progs, dcraw and ufraw.
- You can use ufraw for displaying and enhancing a single image.
- If you want to convert large number of files you can use following Perl script with dcraw tool:
#!/usr/bin/perl opendir (DIR, "."); @files= readdir(DIR); foreach $file (@files){ next unless $file =~ /([^\.]*)\.CR2$/; print "Converting $file\n"; system("dcraw -c $file | cjpeg > $1.jpg"); }