Test EXIF extraction

by rowntreerob

HTML

Upload a local file to read Exif data.
<br/>
<input id="file-input" type="file" >
<br/><br/>

Click the images to read Exif data. The first image tests reading single tags, while the other two simply show all available data.
<br/><br/>
Note: these examples will not work if running from a local file:// URL.
<br/><br/>
<img src="http://i5.minus.com/iN25Enzz2QDOE.jpg" id="img1" />
<br/>
<img src="http://hdrwallpapers.com/wallpapers/blue_eyed_puppy-1280x800.jpg" id="img2" />
<br/>
<img src="http://upload.wikimedia.org/wikipedia/commons/c/c9/Moon.jpg" id="img3" /><br/>
<br/>
<button id="objecturltest">Object URL Test</button><br/>
<br/>
<button id="blobtest">Blob Test</button><br/>
<br/>
<button id="base64test">Base64 Test</button><br/>

CSS

img {
    width: 100px;
}

JavaScript

var EXIF = (function() {

    var debug = false;

    var ExifTags = {

        // version tags
        0x9000 : "ExifVersion",             // EXIF version
        0xA000 : "FlashpixVersion",         // Flashpix format version

        // colorspace tags
        0xA001 : "ColorSpace",              // Color space information tag

        // image configuration
        0xA002 : "PixelXDimension",         // Valid width of meaningful image
        0xA003 : "PixelYDimension",         // Valid height of meaningful image
        0x9101 : "ComponentsConfiguration", // Information about channels
        0x9102 : "CompressedBitsPerPixel",  // Compressed bits per pixel

        // user information
        0x927C : "MakerNote",               // Any desired information written by the manufacturer
        0x9286 : "UserComment",             // Comments by user

        // related file
        0xA004 : "RelatedSoundFile",        // Name of related sound file

        // date and time
        0x9003 : "DateTimeOriginal",        // Date and time when the original image was generated
        0x9004 : "DateTimeDigitized",       // Date and time when the image was stored digitally
        0x9290 : "SubsecTime",              // Fractions of seconds for DateTime
        0x9291 : "SubsecTimeOriginal",      // Fractions of seconds for DateTimeOriginal
        0x9292 : "SubsecTimeDigitized",     // Fractions of seconds for DateTimeDigitized

        // picture-taking conditions
        0x829A : "ExposureTime",            // Exposure time (in seconds)
        0x829D : "FNumber",                 // F number
        0x8822 : "ExposureProgram",         // Exposure program
        0x8824 : "SpectralSensitivity",     // Spectral sensitivity
        0x8827 : "ISOSpeedRatings",         // ISO speed rating
        0x8828 : "OECF",                    // Optoelectric conversion factor
        0x9201 : "ShutterSpeedValue",       // Shutter speed
        0x9202 : "ApertureValue",           // Lens...