tags:

views:

373

answers:

1

I'm writting a hobby project to deal with files on cameras. Previously I found issues with the camera and the FolderBrowserDialog.

What I believe is happing is that the camera is using MTP or PTP (Picture Transfer Protocol not peer-to-peer).

In order to make interfacing with the camera more seamless I'd like to use PTP or MTP to access the camera. Are there any MTP / PTP Wrappers for .Net people can recommend? I'm keen to avoid writing my own or dabbling in unmanaged code if possible.

+1  A: 

I have found this blog post by dimeby8 which has been a great starting point with a lot of useful information about how the protocol works, however it leaves a lot to be desired in the way of managed implementations

http://blogs.msdn.com/dimeby8/archive/tags/C_2300_/default.aspx

I have also found a crude C++/CLI MTP wrapper- it has next to no functionality but is a good demonstration of mixed managed/unmanged code:

http://ko.sourceforge.jp/projects/sfnet_mtpsharp/

And there's a CodePlex project but it doesn't demonstrate transfers or - what I'm interested in- editing camera metadata (specifically the camera date)

http://www.codeplex.com/portabledevicelib/

Have you had any success with this project?

Fred
Thanks for the advice. I haven't had much time to continue working on this side project. I've been too busy!When you say camera date, do you mean the date/time the camera is set to? Or the date/time of the files it saves. If it's the latter, I suggest you give Exif Tool a look into - http://www.sno.phy.queensu.ca/~phil/exiftool/
NekoJoe
Unfortunately, it's the former. I have some manged code (a translation of dimeby8's posts http://blogs.msdn.com/dimeby8/archive/2006/10/13/sending-mtp-commands-through-wpd-part-2-data-to-the-device.aspx ) but when I execute it with 2 different point and shoot cameras I get success on the method calls but different versions of "not supported" as the return code from the camera :( If you're looking for a managed version of that code I'd be happy to share it. Also, re: Exif, check out http://www.codeproject.com/KB/list/imagelistview.aspx -awesome .net listview plus excellent managed Exif wrapper
Fred