Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use ImageMagick utilities to display/convert raw image files which do not come with any metadata inside?

Tags:

imagemagick

I got a RAW image file (from a camera sensor module) which does not contain any metadata inside, but I know the metadata from other source, i.e., its width*height, and the depth (8-bit grey). How can I tell imagemagick utilities (convert, e.g.) to convert it to other formats?

Btw, I can open it using Photoshop (by telling it the metadata in a popup dialog), but Photoshop is not conveninent for my task at hand.

Thanks,

/bruin

like image 681
bruin Avatar asked Oct 22 '25 13:10

bruin


1 Answers

In ImageMagick you use the -size and -depth arguments with the qualifier of GRAY or RGB depending upon if your file is grayscale or color. So

convert -size WIDTHxHEIGHT -depth 8 GRAY:inputname.suffix outputname.newsuffix

newsuffix might be gif, tif, png, jpg, etc. suffix may or may not exist, but could be bin or something else.

But you will need to have dcraw or ufraw depending upon your OS compiled on your system, since ImageMagick uses those to do the work. You could also use those standalone without ImageMagick

like image 171
fmw42 Avatar answered Oct 27 '25 01:10

fmw42