Clone this wiki locally
EDSDK4J: Canon EOS Digital Software Development Kit EDSDK Java Wrapper
The canon EDSDK is a great library to control pretty much any aspect of your canon SLR camera from any application.
Currently there are some very important limitations you shouldn't forget: 1. It only works in windows - mac support is painful and currently crashes 3. We are not allowed to include the required dll's for the SDK, please apply for a download yourself. It might take a few days... 4. Parts of the code is based on the openframeworks classes for ofxCanonCameraWrapper.
First you need to apply and download the EDSK, it might take a few days and you may not be accepted if you are trying to use this for personal use only.
Once you have the download copy the EDSDK folder into this project, you should see this:
edsdk4j - EDSDK - dll - Header
After those two steps import the project in eclipse, all the required files are included.
The examples inside src/gettingstarted should provide a good starting point. You can either use the c-style api directly (example 1), but you won't enjoy this (so look at examples 2, 3, ...) instead :)
There is no working mac version yet. See https://github.com/kritzikratzi/edsdk4j/issues/23 These steps are necessary:
- change all occurences of StdCallCallback (StdCallbackLibrary) to Callback (Library)
- remove all reference to windows api's. should be easy to find because they make your app crash when you launch :)
- remove the dispatch message calls (peekMessage/dispatchMessage/translateMessage)
- copy the edsdk framework to /Library/Frameworks or /System/Library/Frameworks
- ✓ fiddle with the library loading a bit.
- if you would like to use callbacks (e.g. for downloading images) make sure to have some awt window open. calling
new Frame().dispose();seems to be enough to get the nsapplication loop going.
- ✓ The
-d32JVM arguments to force 32bit mode doesn't help anymore since JDK 7. The latest edsdk is 64bit mode and needs to be used . good luck :)
Until 2016 the build environment for this project was ant which is now deprecated. You might want to use maven to get more mileage.
To build the jar file run
The ant build.xml is deprecated and might need some fiddling to get it work again
JNAErator Maven plugin
<!-- https://mvnrepository.com/artifact/com.nativelibs4java/maven-jnaerator-plugin --> <dependency> <groupId>com.nativelibs4java</groupId> <artifactId>maven-jnaerator-plugin</artifactId> <version>0.12</version> </dependency>
pre 2010 - who?: Due to the lack of a Canon SLR I currently do not maintain this project. Feel free to fork and play with it! Also: it seems the user yeroc has a newer version than me, you might fork that one instead ...-
2010 kritikratzi (Hansi Raber):
since 2014-08 at github:
2016 Wolfgang Fahl:
- https://github.com/BITPlan/edsdk4j/ merged here on 2016-08-23