raw to JPEG conversion

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?".
Posts: 37
Joined: 2008-09-01T08:31:26-07:00

raw to JPEG conversion

Post 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?).

Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: raw to JPEG conversion

Post 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

User avatar
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: raw to JPEG conversion

Post 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


Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: raw to JPEG conversion

Post 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.