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?