Page 1 of 1

raw to JPEG conversion

Posted: 2012-05-11T13:56:47-07:00
by davidb2002
I am working on a PHP application which will allow users to upload raw camera files and I would like to convert them to jpeg. Is there a way to do this with ImageMagick (or perhaps something else?).

Re: raw to JPEG conversion

Posted: 2012-05-11T14:09:46-07:00
by Bonzo
Have you tried a search for RAW? It comes up with 48 pages.

Basicaly it the same as any other conversion:

Code: Select all

convert image.CR2 -thumbnail 128x128 output.jpg
As you are saving to jpg speed up the process with the jpg hint:

Code: Select all

convert -define jpeg:size=128x128 image.CR2 -thumbnail 128x128 output.jpg

Re: raw to JPEG conversion

Posted: 2012-05-11T14:36:28-07:00
by fmw42
see http://www.imagemagick.org/Usage/formats/#rgb

not sure if raw uses -define or -size for the definition of the input size. For reading in jpg it is definitely -define for the reading hint

see
http://www.imagemagick.org/Usage/formats/#jpg_read

Re: raw to JPEG conversion

Posted: 2012-05-20T21:39:56-07:00
by henrywho
ImageMagick seems to be converting raw files with the bundled dcraw 9.06 which is a bit too old.

You may want to take a look at the dcraw "clone" in LibRaw (http://www.libraw.org/download) which has more demosaic and denoise methods.