[BREAKGLASS] Append-only mirror of github.com/sparrowwallet/openpnp-capture-java
Go to file
Craig Raw 637058ae52
Some checks failed
Build OpenPnP Capture Java Distribution / build (8, ubuntu-latest) (push) Has been cancelled
add test program
2025-06-09 11:40:25 +02:00
.github/workflows v0.0.28 test COM fix for Windows 2023-05-19 14:37:14 -05:00
scripts update binaries download script 2025-03-11 15:05:07 +02:00
src add test program 2025-06-09 11:40:25 +02:00
.gitignore Merge branch 'switch_to_jna_only' of https://github.com/brainstorm/openpnp-capture-java into brainstorm-switch_to_jna_only 2023-02-16 21:22:18 -06:00
LICENSE.txt Add deployment configuration to pom for releasing on Central. 2017-09-18 02:22:52 -05:00
pom.xml bump to v0.0.28-6 2025-06-03 12:31:36 +02:00
README.md Let's change master to main, and call this good. 2023-02-16 21:59:05 -06:00

OpenPNP Logo

openpnp-capture-java

Java bindings for the openpnp-capture video capture library. Releases include all platform binaries and support auto extraction for a "plug and play" experience. Simply install the Maven dependency and start capturing!

Usage

Maven

<dependency>
	<groupId>org.openpnp</groupId>
	<artifactId>openpnp-capture-java</artifactId>
</dependency>

Example

public static void main(String[] args) {
    OpenPnpCapture capture = new OpenPnpCapture();
    CaptureDevice device = capture.getDevices().get(0);
    CaptureFormat format = device.getFormats().get(0);
    CaptureStream stream = device.openStream(format);
    BufferedImage image = stream.capture();
}

Build

See https://github.com/openpnp/openpnp-capture/releases to pick a release of the native library to build against and specify it's tag name in the next command.

./scripts/download-openpnp-capture.sh <RELEASE>
mvn clean package

Release

Releases are built automatically using Github Actions. Binaries for non-tagged commits can be downloaded from the Actions tab. Binaries for tagged releases are deployed to Maven Central and Github Releases.

To release a new version to Github Releases and Maven central:

  1. Choose an OpenPnP Capture release from https://github.com/openpnp/openpnp-capture/releases.
  2. Update the version line in .github/workflows/build.yml to include that release name.
  3. Update the version in pom.xml. Should match release. Append -n for sub-releases.
  4. Commit and tag the changes with the new version number.
  5. Push to main.
  6. Github Actions will build and deploy the release.