Catch window close events
Added routine painting black image into window
Added definition of PIX_FMT_GRAY8
Working on frame conversions