log fopen fname failures
average rgb when converting to luminance
add luminance alpha support