问题从佳能相机到电脑下载图片 [英] problem with download picture from canon camera to pc
问题描述
我连一个EOS佳能相机到电脑
我有,我可以拍照remotly,并下载图像到PC的应用程序,
i connected a eos canon camera to pc
i have an application that i could take picture remotly ,and download image to pc,
但是当我从相机中取出SD卡,我不能从缓冲下载图像到电脑
but when i remove the SD card from camera , i cant download image from buffer to pc
//注册objceteventcallback
// register objceteventcallback
err = EDSDK.EdsSetObjectEventHandler(obj.camdevice, EDSDK.ObjectEvent_All, objectEventHandler, new IntPtr(0));
if (err != EDSDK.EDS_ERR_OK)
Debug.WriteLine("Error registering object event handler");
///
public uint objectEventHandler(uint inEvent, IntPtr inRef, IntPtr inContext)
{
switch(inEvent)
{
case EDSDK.ObjectEvent_DirItemCreated:
this.getCapturedItem(inRef);
Debug.WriteLine("dir item created");
break;
case EDSDK.ObjectEvent_DirItemRequestTransfer:
this.getCapturedItem(inRef);
Debug.WriteLine("file transfer request event");
break;
default:
Debug.WriteLine(String.Format("ObjectEventHandler: event {0}", inEvent));
break;
}
return 0;
}
有人可以帮助我,为什么这个事件不打电话,
anyone could help me , why this event does not call ,
或如何我从缓冲区中下载图片到电脑,使用了具有SD卡上的我的相机
or how i download image from buffer to pc, with out have Sd card on my camera
感谢
推荐答案
您可能会遇到同样的问题,因为我昨天做:相机试图存储图像可下载以后,发现没有存储卡,将其存储到与立即丢弃的形象。
You probably ran into the same problem as I did yesterday: the camera tries to store the image for a later download, finds no memory card to store it to and instantly discards the image.
为了让您的回调,火,您需要将相机设置相机初始化程序中保存图像到PC(kEdsSaveTo_Host)在某一时刻。在C ++中,它的工作是这样的:
To get your callback to fire, you need to set the camera to save images to the PC (kEdsSaveTo_Host) at some point during your camera initialization routine. In C++, it worked like this:
EdsInt32 saveTarget = kEdsSaveTo_Host;
err = EdsSetPropertyData( _camera, kEdsPropID_SaveTo, 0, 4, &saveTarget );
您可能需要建立一个IntPtr这一点。至少,这就是德米特里Prozorovskiy都在的 akadunno 的提示) nofollow的>这个线程。
You probably need to build an IntPtr for this. At least, that's what Dmitriy Prozorovskiy did (prompted by a certain akadunno) in this thread.
这篇关于问题从佳能相机到电脑下载图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!