Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EosSavePicturesToHost Issue #11

Open
stevewong127 opened this issue Mar 19, 2012 · 7 comments
Open

EosSavePicturesToHost Issue #11

stevewong127 opened this issue Mar 19, 2012 · 7 comments

Comments

@stevewong127
Copy link

I am trying to implement saving the pictures to some locations in the computer:

camera.TakePicture();
camera.SavePicturesToHost("G:\Test_Canon");

However, there is always a error :

Unhandled Exception: Canon.Eos.framework.EosException: Device Busy.
Failed to set SaveTo Location.

I will appreciate your answer.

@TechGeek
Copy link

Try
camera.SavePicturesToHost("G:\Test_Canon");
camera.TakePicture();

I have no problem saving to my PC.

@esskar
Copy link
Owner

esskar commented Mar 28, 2012

Hi. Let me get back to this. My camera broke, so i had to get it fixed.

@simonbuehler
Copy link
Contributor

worksforme as described above

@Bamboozled
Copy link

Hi Esskar,
First, I would like to thank you for putting this code on the net. I'm a fairly new C# developer, and have never before written a program that controls/uses anything outside the computer, so getting this to work is quite exciting for me.
I still don't have quite what I want though. I'm looking for a command-line utility that I can then call using a web interface or whatever (once the basic code is working, I'll be wanting to pass in a couple of params). My code for this is pretty much the same as everyone else's, and I'm having the same problem: I can create my folder, but I cannot save images to it.
Using VS2010, Vista, EOS 50D.
Any suggestions would be hugely appreciated.

                    namespace CanonCameraController {
                        class Program {
                            static void Main(string[] args) {
                                var framework = new EosFramework();
                                var cameras = framework.GetCameraCollection();
                                foreach (var camera in cameras) {
                                    Console.WriteLine("Connected to {0}", camera.DeviceDescription);
                                    try {
                                        string path = Properties.Settings.Default.ImageSavePath;
                                        string fileName = Properties.Settings.Default.ImageName;

                                        DirectoryInfo dir = new DirectoryInfo(path);
                                        if (!dir.Exists)
                                            dir.Create();
                                        camera.SavePicturesToHost(dir.FullName);
                                        camera.TakePicture();
                                    }
                                    catch (EosException eos) {
                                        Console.Error.WriteLine("Last command failed with error {0}, {1}", eos.EosErrorCode, eos);
                                        Console.ReadLine();
                                    }
                                }
                            }
                        }
                    }

@Bamboozled
Copy link

Further to the problems that I and some others are having about this, I wonder if the comment below (source: http://tech.groups.yahoo.com/group/CanonSDK/message/1648) is relevant?
Make sure that after the image is downloaded you have call the
EdsDownloadComplete function. Without it the camera is blocked because thinks
that the transfer is not completed.

It is actually with regard to the camera showing "Busy" after trying to save the photo to PC, which is another problem I am having, but is closely enough related that I thought I'd share it.

@Bamboozled
Copy link

This problem appears to only manifest itself when creating a command-line app. I have just tried WinForms and WPF apps. Both work.
Interestingly, if I add an Application.Exit() to the end of my Form1.Load event (on load, the photo is taken) then the photo is not saved. It seems that the application is closed before all the events associated with taking a photo have finished. So, to have a commandline app that saves photos to the pc, I'm still stuck.
If anyone has a way to work around this, please let me know.

@Bamboozled
Copy link

Is anyone else having problems with this?
Can anyone propose a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants