buf[j + 1] = data[i + 1];
buf[j + 2] = data[i + 2];
}
- } else if(components == 1) {
+ } else if (components == 1) {
for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) {
buf[j] = data[i];
}
return loadedName;
}
- function buildPaintImageXObject(image, inline) {
+ function buildPaintImageXObject(image, inline) {
var dict = image.dict;
var w = dict.get('Width', 'W');
var h = dict.get('Height', 'H');
// For natively supported jpegs send them to the main thread for decoding.
var dict = image.dict;
var colorSpace = dict.get('ColorSpace', 'CS');
- colorSpace = ColorSpace.parse(colorSpace, xref, res);
+ colorSpace = ColorSpace.parse(colorSpace, xref, res);
var numComps = colorSpace.numComps;
handler.send('jpeg_decode', [image.getIR(), numComps], function(message) {
var data = message.data;
/**
* Builds a promise that is resolved when all the passed in promises are
* resolved.
- * @param Array promises
- * @return Promise
+ * @param {Promise[]} promises Array of promises to wait for.
+ * @return {Promise} New dependant promise.
*/
Promise.all = function(promises) {
var deferred = new Promise();
this.messager = messager;
this.id = id;
}
-}
+};
function MessageHandler(name, comObj) {
this.name = name;