I am trying to use the Canon Eos Digital SDK (EDSDK) to decode a CR2 camera image for display in a desktop GUI.
I run the first few methods as follows:
err = EDSDK.EdsInitializeSDK();
err = EDSDK.EdsCreateFileStream(
fullpath,
EDSDK.EdsFileCreateDisposition.OpenExisting,
EDSDK.EdsAccess.Read,
out inStream);
err = EDSDK.EdsCreateImageRef(inStream, out imgRefPtr);
And the err variable remains as EDS_ERR_OK until it executes the last line above, where it becomes EDS_ERR_FILE_FORMAT_UNRECOGNIZED.
The camera that took the image was a EOS 5DS R, which has been supported from the 3.2.1 release (our current version). Moreover, the CR2 image can be opened in the raw image viewer, Digital Photo Professional 4.
Any suggestions on how to overcome the file format unrecognized error when trying to create image reference?
I just started using EDSDK v 3.8.0. I had the same issue, but I was able to find out what caused it for me: Version 1.x searches for the dlls in the working path, while 2.x and 3.x search at the location of the exe using the dlls. So copying the files in the debug and release directories of my Visual Studio project fixed it for.
I'm trying to solve a similar issue right now with the same camera and Canon SDK. The changelog for this release states:
"Added support for RAW development functionality. Added support for RAW development functionality for the beta version of 64-bit module. Please note:Supported cameras are limited as below for the image hadling functions in 64-Bit module. EOS 5DS / EOS 5DS R / EOS REBEL T6s / EOS 760D / EOS 8000D / EOS REBEL T6i / EOS 750D / EOS Kiss X8i / EOS M3"
Have you tried to perform the image processing via a 64-bit application?
来源:https://stackoverflow.com/questions/35545048/canon-digital-sdk-edsdk-edscreateimageref-error