/*
 * Qimage - Simple Promise Image Loader based on Q
 */
(function (definition) {
    if (typeof exports === "object") {
        module.exports = definition();
    } else {
        window.Qimage = definition();
    }
})(function () {

  var Q = window.Q || require("q");

  // QImage
  // ===
  // *Creates an Image Loader.*
  //
  // Parameters
  // ---
  // `url` **(string)**: load an Image with its URL
  //
  // Result
  // ---
  // Returns a **(Promise of Image)**
  //
  var Qimage = function (url) {
    var img = new Image();
    img.crossOrigin = "Anonymous";
    var d = Q.defer();
    img.onload = function () {
      d.resolve(img);
    };
    img.onabort = function (e) {
      d.reject(e);
    };
    img.onerror = function (e) {
      d.reject(e);
    };
    img.src = url;
    return d.promise;
  };

  return Qimage;

});



@@ -401,16 +401,67 @@
 its URL%0A
+  // %60options%60 **(obeject)**: configuration object%0A
   //%0A  /
@@ -553,73 +553,158 @@
 (url
-) %7B%0A    var img = new Image();%0A    img.crossOrigin = %22Anonymous%22;
+, options) %7B%0A    options = options %7C%7C %7B%7D;%0A    var img = new Image();%0A    if (options.crossorigin) %7B%0A      img.crossOrigin = options.crossorigin;%0A    %7D
 %0A   

add options object