This project has moved. For the latest updates, please go here.

CR2 to JPG error

Mar 26 at 7:19 AM
Edited Mar 26 at 7:19 AM
I googled and found the latest compiled version of dcraw.exe here:
http://axelriet.blogspot.com/2009/01/ready-made-dcrawexe-8901417-20090121.html


I placed both copies, dcraw.exe, and dcraw64.exe in my bin folder (VS2015) where Magick.NET-Q8-AnyCPU.dll was sitting.

I found a CR2 file in my collections and I used the code under documentation
            using (MagickImage image = new MagickImage(Server.MapPath("/GalleryImages/Masters/viennaball2009_153.CR2")))
                {
                image.Write(Server.MapPath("/GalleryImages/Masters/StillLife.jpg"));
                }
``` This is the error I got:

An exception of type 'ImageMagick.MagickBlobErrorException' occurred in Magick.NET-Q8-AnyCPU.dll but was not handled in user code

Additional information: unable to open image 'C:/Users/John/AppData/Local/Temp/magick-8560LBb9ZV85KNV-.ppm': No such file or directory @ error/blob.c/OpenBlob/3094
Coordinator
Mar 26 at 9:21 AM
You will need to download the InageMagick version of dcraw as described here: https://magick.codeplex.com/wikipage?title=Read%20raw%20image%20from%20camera&referringTitle=Documentation. Other versions won't work.
Mar 26 at 6:33 PM
There is no .zip file called
ImageMagick-7.X.X-X-Q16-x86-windows.zip at the location you mention.
There are a ton of downloads. The only windows zips are:

ImageMagick-7.0.5-4-portable-Q16-x86.zip Portable Win32 static at 16 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).

ImageMagick-7.0.5-4-portable-Q16-x64.zip Portable Win64 static at 16 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).
Mar 26 at 6:52 PM
Edited Mar 26 at 6:52 PM
Ok, I found dcraw.exe in both of the above .zip files. The operative word is "portable", I guess. Maybe the link should be changed in Documentation.

If my system is 64-bit Windows 7, and I have Magick.NET-Q8-AnyCPU.dll installed in my project, which dcraw.exe do I use? The x64 or the x86?

Oh, and thank you!
Mar 26 at 7:01 PM
Edited Mar 26 at 7:17 PM
I installed the X64 first and then replace with x86 and am receiving this error which is the same.

An exception of type 'ImageMagick.MagickBlobErrorException' occurred in Magick.NET-Q8-AnyCPU.dll but was not handled in user code

Additional information: unable to open image 'C:/Users/John/AppData/Local/Temp/magick-7848bvPENCgis8-1.ppm': No such file or directory @ error/blob.c/OpenBlob/3094

The only folder in the temp area is this one:

C:\Users\John\AppData\Local\Temp\Magick.NET.net40-client.7.0.4.701
Coordinator
Mar 27 at 2:31 AM
Edited Mar 27 at 3:15 AM
I should add this to the documentation. If you want to use dcraw together with the AnyCPU version of Magick.NET you should set the directory where the x86/x64 versions are extracted. You can use MagickAnyCPU.CacheDirectory for this. You should place the dcraw executable in the directory that you specify.