Giter VIP home page Giter VIP logo

android-exif-extended's Introduction

Android-Exif-Extended

Description

Exif library for Android. It's based on the android [ExifInterface] 1 and on the [Jhead] 2 c library

Import

Just add this line to your dependency group:

compile 'it.sephiroth.android.exif:library:+'

Usage

import it.sephiroth.android.library.exif2.ExifInterface;
import it.sephiroth.android.library.exif2.ExifTag;

ExifInterface exif = new ExifInterface();
exif.readExif( filename, ExifInterface.Options.OPTION_ALL );

// list of all tags found
List<ExifTag> all_tags = exif.getAllTags();

// jpeg quality
int jpeg_quality =  exif.getQualityGuess()

// image size
int[] imagesize = exif.getImageSize();

// process used to create the jpeg file
short process = exif.getJpegProcess();

// gps lat-lon
double[] latlon = exif.getLatLongAsDoubles();


....
// save
exif.writeExif( src_file, dst_file );

License

This software is licensed under the Apache 2 license, quoted below.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

See Also

For more informations about Exif Format see [exifStandard2.pdf] 3

android-exif-extended's People

Contributors

aizbyakov avatar nik527 avatar sephiroth74 avatar youngjaekim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-exif-extended's Issues

android studio 3 gradle:3.0.1

In gradle
implementation 'it.sephiroth.android.exif:library:+'
build error multidex commons-io

fixed by replace to this string
implementation ('it.sephiroth.android.exif:library:+') { exclude module: 'commons-io' } implementation 'commons-io:commons-io:2.4'

how create ExifTag

when ExifTag tagOrientation = exifInterface.getTag (ExifInterface.TAG_ORIENTATION); is always null

       ExifInterface exifInterface = new ExifInterface();
       exifInterface.readExif( path, ExifInterface.Options.OPTION_ALL );
       ExifTag tagOrientation = exifInterface.getTag(ExifInterface.TAG_ORIENTATION);

as I can create a tag for orientation

License incomplete

Heyo!

I know, wrong place to do so, but atleast for your Exif-library, the license is incomplete. To be precise, you're missing the first line of the apache license as described here

It would be hella awesome, if you could fix that, so I can sleep soundly once I ship my app.

Have a nice day

How to write a Tamil text in Exif tags

I am trying to write both Tamil and English text in Exif tags but it displays ???? for Tamil text alone.
Is there any other way to write Tamil text in Exif tag?

ExifInterface exif = new ExifInterface(someFile.getPath());
String text="ENGLISHதமிழ்";
exif.setAttribute(ExifInterface.TAG_IMAGE_DESCRIPTION,text);
exif.saveAttributes();

I need lib to jar file

Hi:
I need lib to jar using in eclipse
Would you build a jar file for me
I don't know how to include Android Studio to eclipse

Thanks

chinese characters not supported

US-ASCII supported only. I don't know whether it supports unicode. I modified the US-ASCII to UTF-8,and then I can write chinese characters to exif and can be displayed normaly by other apps.

Correct library version

I am a bit confused about which version of your library should be used, as there are quite a few different versions.

There is http://mvnrepository.com/artifact/it.sephiroth.android.exif/library in version 1.0.1, which works.

Then there are the versions 1.0.2, 1.0.4, 1.0.5 and 1.0.6 under a different name: http://mvnrepository.com/artifact/it.sephiroth.android.exif/android-exif-extended
I tested 1.0.5 and 1.0.6 but my changes were not saved at all.

And here http://mvnrepository.com/artifact/it.sephiroth.android.library.exif/library-java are the versions 2.97.x I haven't tried those.

Which version do you suggest should be used?

NoClassDefFoundError

Hi,

I want test your library in Android and when I import library to new project in Eclipse app crash with java.lang.NoClassDefFoundError

Here is logcat scr:
zrzut ekranu 2014-02-18 o 13 19 18

and here is how I include your library to Android project in Eclipse:

zrzut ekranu 2014-02-18 o 13 21 37

Could you help me? Is it possible I am just including projects wrong?

apache common-io dependency conflict with proguard

Hi, I'm using your library to have more control on exif tags than android default one, it seems to work very good !

However I faced a problem with commons-io dependency. I use other libraries in my project and one of them uses a more recent version of commons-io, and that prevents builds from using proguard (that complains about duplicate zip entry). Would it be possible that you change your import to use version 2.0.1 of commons-io which seems to be the current one ?
http://mvnrepository.com/artifact/commons-io/commons-io/2.0.1

That would prevent from including your sources directly in the project when facing similar cases and use the more "clean" option of gradle depency declaration :)

Thanks a lot

Function to write to a stream rather than file

Hello,

Thanks for putting this library together. For a project I'm working on I put everything through an encryption cipher before writing anything to disk, so only having writeExif functions that write to a file makes things a little more difficult. Could you expose a function in ExifInterface that writes to a stream rather than an output file?

For my project I've just included your source entirely and added this function, which seems to work for my needs:

public void writeExif(final InputStream input, final OutputStream output) throws IOException
{
    writeExif_internal(input, output, mData);
    IOUtils.copy(input, output);
    output.flush();
    output.close();
}

Thanks!

(I would have done a pull request but I'm not really familiar with how to do them properly, so for such a small snippet have just included here!)

Discrepancy on GPS Data Between Android-Exif-Extended and android.media.ExifInterface

You can neither use Android-Exif-Extended to read GPS data written to a JPEG file by android.media.ExifInterface nor use android.media.ExifInterface to read GPS data written to a JPEG file by Android-Exif-Extended. What is bizarre is that android.media.ExifInterface uses jhead underneath the hood http://androidxref.com/6.0.0_r1/xref/external/jhead/main.c which is what Android-Exif-Extended is supposed to be based off of.

No implementation found for native

I'm using your library in my app (http://github.com/yourEXP/beepme) for rotation detection and EXIF preservation when downscaling photos. So far everything worked just great up until 2.97.1.

For 2.97.3 and 2.97.4 I get the following message:
No implementation found for native Lit/sephiroth/android/library/media/ExifInterfaceExtended;.getAttributesNative:(Ljava/lang/String;)Ljava/lang/String;

I'm using the method getAttributeInt for TAG_EXIF_ORIENTATION as well as the methods copyFrom and copyTo.

What has changed for the new versions? Do I have to do something in a different way? Thanks!

Option to turn of logging

For release builds I'd like to have an option to disable the logging from this library. There's a lot of (debug) logging emitted currently.

NPE ExifOutputStream.stripNullValueTags

It crashes from Genymotion emulator 4.4.4. I guess It would crash every time with empty getAllTags

java.lang.NullPointerException
at it.sephiroth.android.library.exif2.ExifOutputStream.stripNullValueTags(ExifOutputStream.java:117)
at it.sephiroth.android.library.exif2.ExifOutputStream.writeExifData(ExifOutputStream.java:78)
at it.sephiroth.android.library.exif2.ExifInterface.writeExif_internal(ExifInterface.java:1157)
at it.sephiroth.android.library.exif2.ExifInterface.writeExif(ExifInterface.java:1089)
at it.sephiroth.android.library.exif2.ExifInterface.writeExif(ExifInterface.java:1062)

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.