Apply a filter to imagery
Layer rendering can be manipulated in precompose
and postcompose
event listeners. These listeners get an event with a reference to the Canvas rendering context. In this example, the postcompose
listener applies a filter to the image data.