docs/demo.js
function (err, images) {
    var alert = $('<div class="alert alert-dismissable fade show">');
    alert.append('<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>');
    if (err) {
      alert.addClass('alert-danger');
      alert.append('<p class="mb-0"><strong>Error:</strong> ' + err.message + '</p>');
    } else {
      alert.addClass('alert-success');
      alert.append('<p><strong>Success:</strong></p>');
      images.forEach(function (image, index) {
        var text = image.width + 'x' + image.height + ', ' + image.bpp + 'bit';
        var url = URL.createObjectURL(new Blob([image.buffer], { type: mime }));
        alert.append('<p class="mb-' + (index === images.length - 1 ? 0 : 3) + '"><a href="' + url + '" target="_blank"><img src="' + url + '" /> ' + text + '</a></p>');
      });
    }
    alert.prependTo('#demos-parse-results');
  }
function (err, images) {
    var alert = $('<div class="alert alert-dismissable fade show">');
    alert.append('<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>');
    if (err) {
      alert.addClass('alert-danger');
      alert.append('<p class="mb-0"><strong>Error:</strong> ' + err.message + '</p>');
    } else {
      alert.addClass('alert-success');
      alert.append('<p><strong>Success:</strong></p>');
      images.forEach(function (image, index) {
        var text = image.width + 'x' + image.height + ', ' + image.bpp + 'bit';
        var url = URL.createObjectURL(new Blob([image.buffer], { type: mime }));
        alert.append('<p class="mb-' + (index === images.length - 1 ? 0 : 3) + '"><a href="' + url + '" target="_blank"><img src="' + url + '" /> ' + text + '</a></p>');
      });
    }
    alert.prependTo('#demos-parse-results');
  }
Handler