New Help Converting RAW to JPEG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
misiti3780

New Help Converting RAW to JPEG

Post by misiti3780 »

Hello,

I have been trying to do this conversion using imagemagick for hours now, and have given up. Hoping to find some help here.

I need to convert these images in RAW (RGB pixel information, 24-bit depth) format to JPEG or TIFF or some format MATLAB can read in.
It seems as though ImageMagick does not support this *.RAW extension. I tried re-labeling them to image.rgb and then converting and no success.
I looked to see if there was RAW delegate library and I found nothing. So i am sitting here stuck not know what to do.

The images are from this database: http://www.ece.osu.edu/~aleix/ARdatabase.html

The guys plainly states you can convert his images using ImageMagick but I cannot seem to figure out how.

Here are the following commands i have tried:

convert m-001-1.raw m-001-1.jpeg
convert -size 768X576 -depth 24 m-001-1.raw m-001-1.jpeg

after relabeling RAW->RGB

convert -size 768X576 -depth 24 m-001-1.rgb m-001-1.jpeg

Can anyone please help me out here?

Thanks in Advanced.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: New Help Converting RAW to JPEG

Post by Bonzo »

What are you using e.g. Linux, windows, batch files, bash files etc.

What version are you using?

I presume the photos have a raw extension ? My digital camera raw photos have a cr2 extension and dng is a popular one.

Use this to find the file formats supported by your setup:

Code: Select all

convert -list Format
misiti3780

Re: New Help Converting RAW to JPEG

Post by misiti3780 »

using windows vista
version of imagemagick: 6.5.9-Q16

alright checked out that command. raw is not listed. the only thing i can find close to it is RGB or RBG

thanks for your help
misiti3780

Re: New Help Converting RAW to JPEG

Post by misiti3780 »

if the RAW is not supported, does that mean there is a delegate library which does support RAW which I do not have?
misiti3780

Re: New Help Converting RAW to JPEG

Post by misiti3780 »

sorry, and yes, the photos have a .RAW extension
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: New Help Converting RAW to JPEG

Post by Bonzo »

Looking at the list of image formats supported and RAW is not one of them: http://www.imagemagick.org/script/forma ... pn3sgg8s46

I would have thought it would be supported but didn't check. I would convert your raw files to the dng format; Adobe have a converter here: http://www.adobe.com/support/downloads/ ... rm=windows I do not know if it will batch convert but if it does not have a look and see if you can find some other software or a batch file to do it.

Looks like it will batch convert and a tutorial here: http://www.sicanstudios.com/pages/tutor ... es-to-dng/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: New Help Converting RAW to JPEG

Post by fmw42 »

for windows, I believe you need the DCRAW delegate library. google for it and you should find the home page.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: New Help Converting RAW to JPEG

Post by el_supremo »

From the information about the file on the website, I think your last command should have worked except that the depth might be incorrect. Try 8:

Code: Select all

convert -size 768X576 -depth 8 m-001-1.rgb m-001-1.jpeg
Also, you can avoid having to rename all the file extensions from .raw to.rgb by using the rgb: prefix like this:

Code: Select all

convert -size 768X576 -depth 8 rgb:m-001-1.raw m-001-1.jpeg
Just in case this fails. How big is one of these files in bytes? It would help us determine the number of bits per colour.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
misiti3780

Re: New Help Converting RAW to JPEG

Post by misiti3780 »

question, i used the following command:

convert -size 768X576 -depth 8 m-001-1.rgb m-001-1.jpeg

the conversion is successful but the image is 768X576 and there are 6 sub-images (all identical) within this image.
if you read the link i posted above, it says the images are 24 bit depth, but when i replace the 8 with the 24, the
conversion fails.

no sure why there are 6 sub images converted, but i think it must have to do with the depth....any ideas?

also, i opened up the RAW image in photoship and there is only one image, not six, which indicates to me that the conversion is wrong.

thanks for all help in advanced.
misiti3780

Re: New Help Converting RAW to JPEG

Post by misiti3780 »

problem solved: solutions was the following

convert -depth 8 -interlace plane -size 768x576 rgb:theimage.raw thenewimage.jpeg

thanks again

joe
biplav
Posts: 1
Joined: 2018-02-02T10:13:07-07:00
Authentication code: 1152

Re: New Help Converting RAW to JPEG

Post by biplav »

I'm using windows, could anyone please guide me how to convert png to Raw in windows using ImageMagick.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: New Help Converting RAW to JPEG

Post by snibgo »

What do you mean by "raw"? If you mean one byte per channel per pixel, with no header:

Code: Select all

magick in.png RGB:out.bin
snibgo's IM pages: im.snibgo.com
Post Reply