Free Trial
10 days, no credit_card

<< More Tutorials

How to read Exif data in json format from an image in Java using rethumb?

To read Exif data in json format from an image in Java use the following code:

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

public class JavaRethumbJsonExample
{
    public static void main(String[] args) throws Exception
    {
        URL url = new URL("http://api.rethumb.com/v1/exif/all/http://images.rethumb.com/image_exif_1.jpg");

        BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));

        String s = null;
        while ((s = reader.readLine()) != null)
            System.out.println(s);

        // Use your favorite json library to parse the response!
    }
}

Start using this example now

Use the following commands to get started:

$ git clone https://github.com/rethumb/rethumb-java-examples.git
$ cd rethumb-java-examples
$ ... Use your IDE of choice to handle the file "read-exif-data-in-json.java"

More examples using Java