Added optional width, height parameters for live (camera) input.