Page 1 of 1

New Help Converting RAW to JPEG

Posted: 2010-02-11T11:15:52-07:00
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.

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T11:26:40-07:00
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

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T13:16:08-07:00
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

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T13:17:07-07:00
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?

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T13:17:50-07:00
by misiti3780
sorry, and yes, the photos have a .RAW extension

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T13:31:11-07:00
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/

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T15:31:28-07:00
by fmw42
for windows, I believe you need the DCRAW delegate library. google for it and you should find the home page.

Re: New Help Converting RAW to JPEG

Posted: 2010-02-11T15:44:13-07:00
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

Re: New Help Converting RAW to JPEG

Posted: 2010-02-17T14:31:52-07:00
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.

Re: New Help Converting RAW to JPEG

Posted: 2010-02-17T14:46:54-07:00
by misiti3780
problem solved: solutions was the following

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

thanks again

joe

Re: New Help Converting RAW to JPEG

Posted: 2018-02-02T10:16:31-07:00
by biplav
I'm using windows, could anyone please guide me how to convert png to Raw in windows using ImageMagick.

Re: New Help Converting RAW to JPEG

Posted: 2018-02-02T10:30:25-07:00
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