Skip to content

reines/exif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exif

Build Status Maven Central

A simple Exif parser for Java.

<dependency>
    <groupId>com.furnaghan</groupId>
    <artifactId>exif</artifactId>
    <version>...</version>
</dependency>

Release versions are deployed to Maven Central, development versions are available via OSS Sonatype.

<repositories>
    <repository>
        <id>oss-sonatype</id>
        <name>oss-sonatype</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

Usage

Read the tags in an image.

final ExifTags tags = ExifParser.read( targetFile );

// Using some helper methods for common tags
System.out.println( tags.getDate() );
System.out.println( tags.getOrientation() );

// Less common tags via ExifTag enum.
System.out.println( tags.get( Image.ISOSpeedRatings ) );

Update the tags in an image.

ExifParser.update( targetFile, tags -> {
    tags.setDate( new Date() );
    tags.setOrientation( ExifTags.Orientation.NORMAL );
    return tags;
} );

Write new tags to an image.

final ExifTags tags = ExifTags.empty();

// Using some helper methods for common tags
tags.setDate( new Date() );
tags.setOrientation( ExifTags.Orientation.NORMAL );

// Less common tags via ExifTag enum.
tags.add( Image.ISOSpeedRatings, 17 );

ExifParser.write( targetFile, tags );

License

Released under the Apache 2.0 License.

About

Exif Parser for Java

Resources

License

Stars

6 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages