Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have a raw file but I don't know the pixel format or the width of the image. I need a tool that can quickly display the data and allow me to try different formats easily. An example of such a tool for Windows would be 7yuv. What software exists for this task on Linux?

Note: This has nothing to do with digital camera raws, which is frustrating my attempts to use Google to answer this question.


share|improve this question
I'm guessing there are lots available (a quick search in the repos will propably give you more than enough results). The one I prefer though is digikam (I haven't tried many others though). I'm also certain that GIMP has a plugin that allows viewing and manipulating raw files. – VasPle Jun 7 '12 at 0:19
Searching the repos finds nothing appropriate. Additionally, these aren't camera raws as stated in the question. – Alistair Buxton Jun 7 '12 at 12:53
Use can use 7yuv in Linux also through WINE. It has a silver rating so it will probably run just fine... if you can't find any linux native alternatives, give it a try. – VasPle Jun 7 '12 at 14:38
up vote 4 down vote accepted

Turns out Gimp can do this. Just open the file as raw, and you get this helpful dialog that allows you to preview the image:

enter image description here

share|improve this answer
How do you open the raw data file? – Val Mar 30 '14 at 18:33
File->Open then change the file type to raw. – Alistair Buxton Apr 1 '14 at 23:42

convert from ImageMagick can do it.

E.g., an 8-bit 2x3 grayscale:

printf '\x00\xFF\x88\xFF\x00\xFF' > f


convert -depth 8 -size 3x2+0 gray:f out.png

And view the output with eog for example:

nohup eog out.png &>/dev/null &

Make sure to zoom a lot for such a small image.

If that wasn't the right one, change some parameter, e.g. let's make it 2x3:

convert -depth 8 -size 2x3+0 gray:f out.png

and eog automatically updates.

Command explanation:

  • -depth 8: each color has 8 bits
  • -size 2x3+0: 2x3 image. +0 means starting at offset 0 in the file. If there are metadata headers, you can skip them with the offset.
  • gray:f: the input file is f, and the format is gray, as defined at This weird notation is used because ImageMagick usually determines the format from the extension, but here there is no extension.

RGB example:

printf '\xFF\x00\x00\x00\xFF\x00\x00\x00\xFF' > f
convert -depth 8 -size 1x3+0 rgb:f out.png
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.