This program demonstrates using mouse events and how to make and use a mask image (black and white) .