Free Trial
10 days, no credit_card

<< More Tutorials

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

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

require 'net/http'
require 'json'

Net::HTTP.start("api.rethumb.com") do |http|
    response = http.get("/v1/exif/all/http://images.rethumb.com/image_exif_1.jpg")

    json = JSON.parse(response.body)

    print json
end

Start using this example now

Use the following commands to get started:

$ git clone https://github.com/rethumb/rethumb-ruby-examples.git
$ cd rethumb-ruby-examples
$ ruby read-exif-data-in-json.rb

More examples using Ruby