diff --git a/src/ol/source/rastersource.js b/src/ol/source/rastersource.js index f9d6cd7fdb..425817d268 100644 --- a/src/ol/source/rastersource.js +++ b/src/ol/source/rastersource.js @@ -104,6 +104,15 @@ ol.source.Raster = function(options) { goog.inherits(ol.source.Raster, ol.source.Image); +/** + * Reset the operations. + * @param {Array.} operations New operations. + */ +ol.source.Raster.prototype.setOperations = function(operations) { + this.operations_ = operations; +}; + + /** * Update the stored frame state. * @param {ol.Extent} extent The view extent (in map units). @@ -199,8 +208,7 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState) { pixel[2] = source[j + 2]; pixel[3] = source[j + 3]; } - this.runOperations_(pixels); - pixel = pixels[0]; + pixel = this.runOperations_(pixels)[0]; target[j] = pixel[0]; target[j + 1] = pixel[1]; target[j + 2] = pixel[2];