Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to manipulate RAW images from the Linux command line, like so:

cat raw1.img | raw2jpg -w 640 -h 480 -pitch 1024 -pixelformat R8G8B8

tr='transpose -pitch 1024 -depth 24'
cat <(cat raw1.img | $tr) <(cat raw2.img | $tr) | transpose -pitch 480 >x-merge.img

cat gamebitmap.dat | (
    raw2png -w $w -h $h -depth 24 -pixelformat R8G8B8
) | png2svg -extractoutline -fuzzy -error 8 -smooth

Obviously I've made up the raw2png, raw2jpg and transpose programs.

Does ImageMagick support operations like this with camera RAW files? If not, is there any other way I can manipulate these images from the command line?

share|improve this question
up vote 1 down vote accepted

Which type of raw file?

There's Sony, Kodak, Nikon, Olympus, etc. Full list

Have you tried convert from ImageMagick, e.g.

convert raw1.img raw1.jpg

What does

file raw1.img


What happens if you rename raw1.img to one of the extensions listed in the link, e.g. raw1.arw or raw1.crw?

share|improve this answer
The raw files are uncompressed bitmap, they don't have any file header, there width/height/depth are unknown. file ... show them as data files. However, in the Full List, RGB, RGBA, 'CMYK` formats fit my need. Thanks! – Xiè Jìléi May 10 '13 at 22:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .