Update image format to avoid blue/red color channel swapping.
Minor fix to mouse event handling.