Problem: Multiple filters can modify an image at the same time, causing image corruption.
Solution: Wrap the call to the filter method in a synchronized block based on the layer's intrinsic lock. This ensures that only one thread can modify the layer's image at any given time.
Original image from HubbleSite
Copyright: Public Domain (NASA and ESA)