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

raw to JPEG conversion

Post by davidb2002 » 2012-05-11T13:56:47-07:00

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

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

Re: raw to JPEG conversion

Post by Bonzo » 2012-05-11T14:09:46-07:00

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
fmw42
Posts: 25404
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: raw to JPEG conversion

Post by fmw42 » 2012-05-11T14:36:28-07:00

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

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

Re: raw to JPEG conversion

Post by henrywho » 2012-05-20T21:39:56-07:00

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.

Post Reply