CR2 to JPG conversion slow - or is 16 seconds normal?

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
mercatore
Posts: 6
Joined: 2015-04-03T09:03:20-07:00
Authentication code: 6789

CR2 to JPG conversion slow - or is 16 seconds normal?

Post by mercatore »

Hi,
I have an 3.4GHz i7 Mac and have installed ImageMagick from Homebrew. I am using
convert XYZ.CR2 XYZ.jpg
to convert a Canon RAW to jpg. It takes 16-17 seconds. Compiled with OpenMP and OpenCL but no change. Is this a normal conversion time? Seems to be terribly long...
Thanks for any hint,
Mercatore
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by snibgo »

On my i7 Windows laptop, converting a 5364x3753 cr2 takes about 3 seconds. This uses dcraw as the delegate.

You might use "-verbose" to see what delegate is used. I don't know if ufraw is slower than dcraw.
snibgo's IM pages: im.snibgo.com
mercatore
Posts: 6
Joined: 2015-04-03T09:03:20-07:00
Authentication code: 6789

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by mercatore »

Thanks. It uses ufraw. I have tried draw and it still is around 7-8 seconds. Would you let me know the options you are using for calling dcraw?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by snibgo »

For this test, I did just:

Code: Select all

dcraw -T -6 -O x.tiff sample.cr2
Going via ImageMagick (which I don't normally):

Code: Select all

f:\web\im>%IM%convert -verbose sample.cr2 x1.jpg

dcraw.exe -6 -w -O "C:/Users/Alan/AppData/Local/Temp/magick-2532ilj-wSLWLUpx.ppm" "C:/Users/Alan/AppData/Local/Temp/magick-2532cetMk3b_2Crx"
snibgo's IM pages: im.snibgo.com
mercatore
Posts: 6
Joined: 2015-04-03T09:03:20-07:00
Authentication code: 6789

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by mercatore »

Thanks, that was fast... When I go to dcraw, I get down to about 4.5 seconds. A bit frustrating when I look at the speed I theoretically have... Not that I do not have the -O option on the Mac but must pipe it to stdout and from there into a file.
mercatore
Posts: 6
Joined: 2015-04-03T09:03:20-07:00
Authentication code: 6789

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by mercatore »

One more: Can I change the "standard delegate" along with the standard options, such as -q 2 in a config file or alike?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: CR2 to JPG conversion slow - or is 16 seconds normal?

Post by snibgo »

Yes. In the directory that contains convert.exe is the text file delegates.xml. Look for a line that contains "dng:". For me, this line is:

Code: Select all

  <delegate decode="dng:decode" stealth="True" command="dcraw.exe -6 -w -O "%u.ppm" "%i""/>
I can add dcraw options, or use a different program.
snibgo's IM pages: im.snibgo.com
Post Reply