fixing input format checks (enabling rgba, bgra) + minor fixes