client/js/image-support/scaler.js
function(originalImage, scaledImageDataUri, log) {
        "use strict";

        var reader = new FileReader(),
            insertionEffort = new qq.Promise(),
            originalImageDataUri = "";

        reader.onload = function() {
            originalImageDataUri = reader.result;
            insertionEffort.success(qq.ExifRestorer.restore(originalImageDataUri, scaledImageDataUri));
        };

        reader.onerror = function() {
            log("Problem reading " + originalImage.name + " during attempt to transfer EXIF data to scaled version.", "error");
            insertionEffort.failure();
        };

        reader.readAsDataURL(originalImage);

        return insertionEffort;
    }
function(originalImage, scaledImageDataUri, log) {
        "use strict";

        var reader = new FileReader(),
            insertionEffort = new qq.Promise(),
            originalImageDataUri = "";

        reader.onload = function() {
            originalImageDataUri = reader.result;
            insertionEffort.success(qq.ExifRestorer.restore(originalImageDataUri, scaledImageDataUri));
        };

        reader.onerror = function() {
            log("Problem reading " + originalImage.name + " during attempt to transfer EXIF data to scaled version.", "error");
            insertionEffort.failure();
        };

        reader.readAsDataURL(originalImage);

        return insertionEffort;
    }
function ( originalImage , scaledImageDataUri , log ) { "use strict" ; var reader = new FileReader ( ) , insertionEffort = new qq . Promise ( ) , originalImageDataUri = "" ; reader . onload = function ( ) { originalImageDataUri = reader . result ; insertionEffort . success ( qq . ExifRestorer . restore ( originalImageDataUri , scaledImageDataUri ) ) ; } ; reader . onerror = function ( ) { log ( "Problem reading " + originalImage . name + " during attempt to transfer EXIF data to scaled version." , "error" ) ; insertionEffort . failure ( ) ; } ; reader . readAsDataURL ( originalImage ) ; return insertionEffort ; }
Attempt to insert the original image's EXIF header into a scaled version.
Attempt to insert the original image s EXIF header into a scaled version .