Giter Club home page Giter Club logo

gphoto2-java's Introduction

GPhoto2 Java Bindings

Java bindings for Linux gphoto/gphoto2 library (see http://www.gphoto.org/ for details).

Example

See the https://github.com/mvysny/gphoto2-java/blob/master/src/main/java/org/gphoto2/Camera.java file for example on usage. Simple usage:

System.out.println("GPhoto version: " + getLibraryVersion());
final CameraList cl = new CameraList();
System.out.println("Cameras: " + cl);
CameraUtils.closeQuietly(cl);
final Camera c = new Camera();
c.initialize();
final CameraFile cf2 = c.captureImage();
cf2.save(new File("captured.jpg").getAbsolutePath());
CameraUtils.closeQuietly(cf2);
CameraUtils.closeQuietly(c);

Note that the https://github.com/twall/jna library is required to be present on the classpath (tested with version 3.0.9).

Downloads

Please find all downloadable artefacts here: http://www.baka.sk/maven2/org/gphoto/gphoto2-java/

Usage with Maven 2/3

Add the baka.sk maven 2 repo to your maven installation - edit ~/.m2/settings.xml so that it will look like the following:

<settings>
 <profiles>
  <profile>
   <id>default</id>
   <activation><activeByDefault>true</activeByDefault></activation>
   <repositories>
    <repository>
     <id>baka</id>
     <name>baka.sk</name>
     <url>http://www.baka.sk/maven2</url>
    </repository>
   </repositories>
  </profile>
 </profiles>
</settings>

Then add the following to your dependencies:

<dependency>
 <groupId>org.gphoto</groupId>
 <artifactId>gphoto2-java</artifactId>
 <version>1.4</version>
</dependency>

Reporting Bugs

If your camera is not working as expected, please try it out with gphoto2 (gphoto2 --capture-image) before reporting bugs for this project. gphoto2-related bugs will be closed as invalid.

gphoto2-java's People

Watchers

Jérôme Courat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.