OhmGeek/JDCraw


A DCraw wrapper for Java.

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.OhmGeek:JDCraw:1.5'
	}
	dependencies {
		implementation("com.github.OhmGeek:JDCraw:1.5")
	}
	<dependency>
	    <groupId>com.github.OhmGeek</groupId>
	    <artifactId>JDCraw</artifactId>
	    <version>1.5</version>
	</dependency>

                            
    libraryDependencies += "com.github.OhmGeek" % "JDCraw" % "1.5"
        
        

                            
    :dependencies [[com.github.OhmGeek/JDCraw "1.5"]]
        
        

Readme


Build Status codebeat badge codecov

JDCraw

Introduction

JDCraw is a wrapper around the popular dcraw executable.

The current system is very much in development, and as such, I wouldn't yet use it in a production system.

Dependencies

The project relies on Maven.

This project relies on the DCRaw executable, built by Dave Coffin. Depending on your operating system, you can install it as follows:

DCRaw Executable

Linux:

Install using the built in package manager.

For Debian/Ubuntu:

sudo apt-get install dcraw

For Fedora:

sudo yum install dcraw

macOS

First, install the brew package manager, if you haven't already.

Then, open Terminal and run the following:

sudo brew install dcraw

Usage

Using JDCraw is very simple. Using a Java File object, simply create an instance of DCRawManager passing the file in:

File fileToEdit = new File('/path/to/file.dng');

DCRawManager manager = new DCRawManager(fileToEdit);

Then, one can use this manager object in several ways.

Operations

DCRaw arguments are expressed in pure English. Let's say I want to flip an image by 90 degrees. Simply create an operation that does that:

RawOperation flipOperation = 
            new FlipImageOperation(FlipAngleEnum.DEGREES90);

Then, add it to the list of operations for DCraw to carry out:

...

manager.addOperation(flipOperation);

Simple!

Tests

There are some tests, but these are not entirely comprehensive. To run the ones present, use Maven:

mvn test

License

Licensed under the MIT License.

DCRaw is licensed under the LGPLv2 license.