function loadImage (input, callback) {
    var image = (typeof input === 'string' ? new Image() : input) || {};
        image.crossOrigin = 'anonymous';

    if (!image.src) image.src = input;
    if (!image.complete) {
        image.onload = function () {
            callback(image);
        };
    }
    else {
        callback(image);
    }

    return image;
}
Loads an image from a string or Image object and executes a callback function.

@method
@private

@param {Object|String} input The input image data to load as an asset.
@param {Function} callback The callback function to be fired when the image has finished loading.

@return {Object} Image object being loaded.