IMG·2·JSON is a simple Google App Engine python application which extracts metadata from images and returns the results as a JSON string.
To use IMG·2·JSON all you need to do is perform a request for the fetcher-script URL hosted on Google App Engine.
urlcallbackurlmimeTypewidthheightbyteSizeexif
The first step is to build up the request URL:
http://img2json.appspot.com/go/?callback=myCallbackMethod& ↵
url=http://assets.flog.co.nz/favicon.png
In the URL above note the callback function set to "myCallbackMethod" and the URL set to "…favicon.png"
The result JSON returned by this request correctly identifies the images associated metadata and encloses the JSON object in the callback method:
myCallbackMethod({
url: "http://assets.flog.co.nz/favicon.png",
mimeType: "image/png",
width: 16,
height: 16,
byteSize: 524,
exif: {}
});
This application was written by Adam Burmister (www.flog.co.nz) in half an hour as a way to learn some Python and Google App Engine.