<p>I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. </p>

<p>how can i capture a photo from USB connected digital still camera device in my windows application ?</p>

[{'answer_id': 75728, 'author': 'Alex Duggleby', 'author_id': 5790, 'author_profile': 'https://Stackoverflow.com/users/5790', 'pm_score': 1, 'selected': False, 'text': '<p>Usually the camera is displayed as a removable drive when attached.</p>\n\n<p>So for a Winforms application just let the user select the drive and the picture you want to upload. You can do any processing once you have the FileStream of the picture.</p>\n\n<p>In ASP.net you are going to need a FileUpload Control where again the user can select the drive and picture to upload. Processing this time would be via MemoryStream on the HttpRequest.Files object.</p>\n\n<p>Hope that helps.</p>\n'}, {'answer_id': 75730, 'author': 'Sean McMains', 'author_id': 2041950, 'author_profile': 'https://Stackoverflow.com/users/2041950', 'pm_score': 0, 'selected': False, 'text': "<p>This depends on your camera.</p>\n\n<p>Many cameras will simply mount as USB mass storage devices. If this is the case, then you can just copy the file from the visible file system like you would any other file on an external disk.</p>\n\n<p>If the camera doesn't make its contents available in this way, you'll need to look at the camera driver documentation to see how they recommend interacting with it.</p>\n"}, {'answer_id': 75740, 'author': 'Mark Ransom', 'author_id': 5987, 'author_profile': 'https://Stackoverflow.com/users/5987', 'pm_score': 0, 'selected': False, 'text': '<p>It will depend on the brand of camera.  Here is a link to start with for <a href="http://www.usa.canon.com/consumer/controller?act=SDKHomePageAct&amp;keycode=Sdk_Lic&amp;fcategoryid=314&amp;modelid=7474&amp;id=3464" rel="nofollow noreferrer">Canon</a>.</p>\n'}, {'answer_id': 75754, 'author': 'Sam', 'author_id': 9406, 'author_profile': 'https://Stackoverflow.com/users/9406', 'pm_score': 2, 'selected': False, 'text': "<p>I assume you want to activate the action of taking a picture from the computer which the camera is attached to. If that is the case then the first thing I would do is search for an API for that particular camera model. I don't believe there is a standard protocol/framework for interacting with digital cameras besides accessing the memory card within the camera.</p>\n"}, {'answer_id': 75898, 'author': 'Ilya', 'author_id': 6807, 'author_profile': 'https://Stackoverflow.com/users/6807', 'pm_score': 2, 'selected': False, 'text': '<p>This is depend on the interface the camera exporting. If this is standard mass storage interface you just use standard file interface, i.e you will see the camera as removable disk and can use standard Create/Read/Write/File operation.<br>\nMany new cameras have ptp (Picture transport protocol) interface. So you will need using <a href="http://msdn.microsoft.com/en-us/library/aa139779.aspx" rel="nofollow noreferrer">Windows Image Acquisition</a> API.</p>\n\n<p>You might find useful following <a href="http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx" rel="nofollow noreferrer">Link</a>. If i understand correctly this is a sample code for exactly what are you looking for. Google is your friend :) </p>\n\n<p>Another piece of info: many cameras will support both mass storage and ptp interfaces and it will be selectable by camera user interface. In case of automatic mode camera probably will switch to ptp interface.</p>\n'}, {'answer_id': 599954, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 4, 'selected': True, 'text': "<p>If you use the Windows Image Acquisition Library, you'll see events there for capturing camera new picture events. I had a similar requirement and wrote a test rig; we went down to the local camera store and tried every camera they had. The only cameras we could find that supported this functionality were the Nikon D-series cameras.</p>\n\n<p>We found that with most cameras, you can't even take a picture when they are plugged in. When you plug them in to the USB port, most cameras will switch into a mode where the only thing they'll do is transfer data. The quick way to find out if a camera will work at all is to plug it into a PC, then try to snap a picture. If it lets you do that you have a chance. It also needs to support PTP.</p>\n"}]
['https://Stackoverflow.com/questions/75691', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13337/']