How to decode an image?

12 views (last 30 days)
Jack
Jack on 3 Jul 2014
Answered: Image Analyst on 3 Jul 2014
So I have an img. file and it wont open in any applications (understandably) so I've been told to view the image in matlab as there is a way to decode (I don't know if that is the right word) the image in order to see it. I know its a broad question but is there a specifically good way to 'decode' an image? Thanks,

Accepted Answer

Image Analyst
Image Analyst on 3 Jul 2014
You could use fread() to read in the bytes as a 2D array and then see what the image looks like. It might look interleaved or sheared or both. Try skipping past the header (guess at how long it might be) and extracting every third element if the image is known to be color. If you don't know the format you have to do these kind of detective things to figure out the format.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!