TurnsCoffeeIntoScripts
TurnsCoffeeIntoScripts

Reputation: 3918

Extracting the exposure time from the JPEG header in android

I'm doing a camera application and I need to extract the exposure time of the picture that's in the header. I'm transferring the image over network and I need to transmit the exposure time before the actual picture.

Now I know that in some program like irfanview you can extract the exposure time, but I need to do it with Android SDK, so I want to know if it's possible at all or if maybe someone already did this.

Thanks

Upvotes: 1

Views: 687

Answers (1)

sdabet
sdabet

Reputation: 18670

Try this:

    try {
        ExifInterface exif = new ExifInterface("test.jpg");
        String exposure = exif.getAttribute(ExifInterface.TAG_EXPOSURE_TIME);
    } catch (IOException e) {
        // Handle IO error
    }

Upvotes: 2

Related Questions